def _hotkey_paintMerge(self, va=None): ''' same as paintdown but only until the graph remerges ''' graph = viv_graphutil.buildFunctionGraph(self.vw, self.fva, revloop=True) startva = self.mem_canvas._canv_curva if startva == None: return viv_graphutil.findRemergeDown(graph, startva) count = 0 colormap = {} for node in graph.getNodesByProp('hit'): count += 1 off = 0 cbsize = node[1].get('cbsize') if cbsize == None: raise Exception('node has no cbsize: %s' % repr(node)) # step through opcode for a node while off < cbsize: op = self.vw.parseOpcode(node[0] + off) colormap[op.va] = 'brown' off += len(op) self.vw.vprint("Colored Blocks: %d" % count) vqtevent('viv:colormap', colormap) return colormap
def _hotkey_paintMerge(self, va=None): """ same as paintdown but only until the graph remerges """ graph = viv_graphutil.buildFunctionGraph(self.vw, self.fva, revloop=True) startva = self.mem_canvas._canv_curva if startva == None: return viv_graphutil.findRemergeDown(graph, startva) count = 0 colormap = {} for node in graph.getNodesByProp("hit"): count += 1 off = 0 cbsize = node[1].get("cbsize") if cbsize == None: raise Exception("node has no cbsize: %s" % repr(node)) # step through opcode for a node while off < cbsize: op = self.vw.parseOpcode(node[0] + off) colormap[op.va] = "brown" off += len(op) self.vw.vprint("Colored Blocks: %d" % count) vqtevent("viv:colormap", colormap) return colormap