Author: Armin Rigo <[email protected]>
Branch: py3.5
Changeset: r88339:625d50ec6fdb
Date: 2016-11-13 10:50 +0000
http://bitbucket.org/pypy/pypy/changeset/625d50ec6fdb/

Log:    make PyPy3 generate debug_merge_points in the new generic format

diff --git a/pypy/module/pypyjit/interp_jit.py 
b/pypy/module/pypyjit/interp_jit.py
--- a/pypy/module/pypyjit/interp_jit.py
+++ b/pypy/module/pypyjit/interp_jit.py
@@ -35,9 +35,12 @@
 
 def get_printable_location(next_instr, is_being_profiled, bytecode):
     from pypy.tool.stdlib_opcode import opcode_method_names
-    from rpython.rlib.runicode import unicode_encode_utf_8
-    name = opcode_method_names[ord(bytecode.co_code[next_instr])]
-    return '%s #%d %s' % (bytecode.get_repr(), next_instr, name)
+    from pypy.interpreter.pytraceback import offset2lineno
+    bytecode_name = opcode_method_names[ord(bytecode.co_code[next_instr])]
+    lineno = offset2lineno(bytecode, intmask(next_instr))
+    return '%s;%s:%d-%d~#%d %s' % (
+        bytecode.co_name, bytecode.co_filename, bytecode.co_firstlineno,
+        lineno, next_instr, bytecode_name)
 
 def get_unique_id(next_instr, is_being_profiled, bytecode):
     from rpython.rlib import rvmprof
@@ -47,7 +50,7 @@
             jl.MP_SCOPE, jl.MP_INDEX, jl.MP_OPCODE)
 def get_location(next_instr, is_being_profiled, bytecode):
     from pypy.tool.stdlib_opcode import opcode_method_names
-    from rpython.tool.error import offset2lineno
+    from pypy.interpreter.pytraceback import offset2lineno
     bcindex = ord(bytecode.co_code[next_instr])
     opname = ""
     if 0 <= bcindex < len(opcode_method_names):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to