Author: Remi Meier <[email protected]>
Branch: stmgc-c4
Changeset: r65537:3e6fe880134a
Date: 2013-07-23 08:53 +0200
http://bitbucket.org/pypy/pypy/changeset/3e6fe880134a/

Log:    fix more tools for new thread number prefix in logs

diff --git a/rpython/jit/tool/loopcounter.py b/rpython/jit/tool/loopcounter.py
--- a/rpython/jit/tool/loopcounter.py
+++ b/rpython/jit/tool/loopcounter.py
@@ -17,11 +17,13 @@
     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 #'):
diff --git a/rpython/jit/tool/oparser.py b/rpython/jit/tool/oparser.py
--- a/rpython/jit/tool/oparser.py
+++ b/rpython/jit/tool/oparser.py
@@ -309,6 +309,7 @@
         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:
diff --git a/rpython/jit/tool/traceviewer.py b/rpython/jit/tool/traceviewer.py
--- a/rpython/jit/tool/traceviewer.py
+++ b/rpython/jit/tool/traceviewer.py
@@ -187,7 +187,7 @@
             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
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to