Author: Remi Meier <[email protected]>
Branch: stmgc-c4
Changeset: r65536:3879aa784b4c
Date: 2013-07-23 08:31 +0200
http://bitbucket.org/pypy/pypy/changeset/3879aa784b4c/

Log:    fix logparser and viewcode.py for new thread number prefix in logs

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
@@ -239,6 +239,7 @@
 
     def parse(self, f, textonly=True):
         for line in f:
+            line = line[line.find('#') + 1:].strip()
             if line.startswith('BACKEND '):
                 self.backend_name = line.split(' ')[1].strip()
             elif line.startswith('CODE_DUMP '):
diff --git a/rpython/tool/logparser.py b/rpython/tool/logparser.py
--- a/rpython/tool/logparser.py
+++ b/rpython/tool/logparser.py
@@ -26,8 +26,11 @@
 
 def parse_log(lines, verbose=False):
     color = "(?:\x1b.*?m)?"
-    r_start = re.compile(color + r"\[([0-9a-fA-F]+)\] \{([\w-]+)" + color + 
"$")
-    r_stop  = re.compile(color + r"\[([0-9a-fA-F]+)\] ([\w-]+)\}" + color + 
"$")
+    thread = "\d+#\s"
+    r_start = re.compile(color + thread + 
+                         r"\[([0-9a-fA-F]+)\] \{([\w-]+)" + color + "$")
+    r_stop  = re.compile(color + thread +
+                         r"\[([0-9a-fA-F]+)\] ([\w-]+)\}" + color + "$")
     lasttime = 0
     log = DebugLog()
     time_decrase = False
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to