Commits

Remi Meier committed 3e6fe88

fix more tools for new thread number prefix in logs

Comments (0)

Files changed (3)

rpython/jit/tool/loopcounter.py

     time0 = None
     lines = iter(log)
     for line in lines:
+        line = line[line.find("#") + 1:].strip()
         if time0 is None and line.startswith('['):
             time0 = get_timestamp(line)
         if '{jit-mem-looptoken-' in line:
             time_now = get_timestamp(line) - time0
             text = lines.next()
+            text = text[text.find("#") + 1:].strip()
             if text.startswith('allocating Loop #'):
                 loops += 1
             elif text.startswith('allocating Bridge #'):

rpython/jit/tool/oparser.py

         newlines = []
         first_comment = None
         for line in lines:
+            line = line[line.find('#')+1:].strip()
             # for simplicity comments are not allowed on
             # debug_merge_point lines
             if '#' in line and 'debug_merge_point(' not in line:

rpython/jit/tool/traceviewer.py

             return real_loops, allloops
         bar.render((i * 100) / len(loops))
         firstline = loop[:loop.find("\n")]
-        m = re.match('# Loop (\d+)', firstline)
+        m = re.match('\d+# # Loop (\d+)', firstline)
         if m:
             no = int(m.group(1))
             assert len(real_loops) == no