1. vinodm
  2. pypy

Commits

Maciej Fijalkowski  committed b9d6205

log also recursion level

  • Participants
  • Parent commits 949cbe9
  • Branches default

Comments (0)

Files changed (3)

File pypy/jit/metainterp/logger.py

View file
         if op.getopnum() == rop.DEBUG_MERGE_POINT:
             jd_sd = self.metainterp_sd.jitdrivers_sd[op.getarg(0).getint()]
             s = jd_sd.warmstate.get_location_str(op.getarglist()[2:])
-            return "debug_merge_point('%s')" % (s,)
+            return "debug_merge_point(%d, '%s')" % (op.getarg(1).getint(), s)
         if ops_offset is None:
             offset = -1
         else:

File pypy/jit/metainterp/test/test_logger.py

View file
     def test_debug_merge_point(self):
         inp = '''
         []
-        debug_merge_point(0, "dupa")
+        debug_merge_point(0, 0, "dupa")
         '''
         _, loop, oloop = self.reparse(inp, check_equal=False)
-        assert loop.operations[0].getarg(1)._get_str() == "dupa"
-        assert oloop.operations[0].getarg(0)._get_str() == "dupa"
+        assert loop.operations[0].getarg(2)._get_str() == "dupa"
+        assert oloop.operations[0].getarg(1)._get_str() == "dupa"
         
     def test_floats(self):
         inp = '''

File pypy/jit/tool/oparser.py

View file
         descr = None
         if argspec.strip():
             if opname == 'debug_merge_point':
-                allargs = argspec.split(',', 1)
+                allargs = argspec.split(',', 2)
             else:
                 allargs = [arg for arg in argspec.split(",")
                            if arg != '']