Author: Remi Meier <remi.me...@gmail.com> Branch: stmgc-c4 Changeset: r66086:f3193a9bf2f3 Date: 2013-08-12 17:12 +0200 http://bitbucket.org/pypy/pypy/changeset/f3193a9bf2f3/
Log: hack to show full 64bit addresses in assembler dump of jitviewer. This doesn't work in cases where the truncated (by objdump) 32bit address already overflows diff --git a/pypy/tool/jitlogparser/parser.py b/pypy/tool/jitlogparser/parser.py --- a/pypy/tool/jitlogparser/parser.py +++ b/pypy/tool/jitlogparser/parser.py @@ -90,7 +90,7 @@ v = " ".join(e[2:]) if not start: start = int(adr.strip(":"), 16) - ofs = int(adr.strip(":"), 16) - start + ofs = int(adr.strip(":"), 16) # add symbols to addresses: for addr in lineaddresses(v): sym = symbols.get(addr) @@ -100,6 +100,7 @@ if ofs >= 0: asm.append((ofs, v.strip("\n"))) # + prefix = hex(dump_start)[:-8] asm_index = 0 for i, op in enumerate(loop.operations): end = 0 @@ -113,12 +114,14 @@ else: end = loop.operations[j].offset if op.offset is not None: - while asm[asm_index][0] < op.offset: + while asm[asm_index][0] - start < op.offset: asm_index += 1 end_index = asm_index - while asm[end_index][0] < end and end_index < len(asm) - 1: + while asm[end_index][0] - start < end and end_index < len(asm) - 1: end_index += 1 - op.asm = '\n'.join([asm[i][1] for i in range(asm_index, end_index)]) + op.asm = '\n'.join([ + prefix+hex(asm[i][0])[2:] + ": " + asm[i][1] + for i in range(asm_index, end_index)]) return loop def _asm_disassemble(self, d, origin_addr, tp): diff --git a/rpython/jit/backend/tool/viewcode.py b/rpython/jit/backend/tool/viewcode.py --- a/rpython/jit/backend/tool/viewcode.py +++ b/rpython/jit/backend/tool/viewcode.py @@ -59,7 +59,7 @@ 'arm_32': 'arm', } cmd = find_objdump() - objdump = ('%(command)s -M %(backend)s -b binary -m %(machine)s ' + objdump = ('%(command)s -w -M %(backend)s -b binary -m %(machine)s ' '--disassembler-options=intel-mnemonics ' '--adjust-vma=%(origin)d -D %(file)s') # _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit