[pypy-svn] r78481 - pypy/trunk/pypy/jit/tool

fijal at codespeak.net fijal at codespeak.net
Fri Oct 29 18:33:06 CEST 2010


Author: fijal
Date: Fri Oct 29 18:33:04 2010
New Revision: 78481

Modified:
   pypy/trunk/pypy/jit/tool/showstats.py
Log:
fix


Modified: pypy/trunk/pypy/jit/tool/showstats.py
==============================================================================
--- pypy/trunk/pypy/jit/tool/showstats.py	(original)
+++ pypy/trunk/pypy/jit/tool/showstats.py	Fri Oct 29 18:33:04 2010
@@ -10,9 +10,9 @@
 
 def main(argv):
     log = logparser.parse_log_file(argv[0])
-    parts = logparser.extract_category(log, "jit-log-opt-")
+    parts = logparser.extract_category(log, "jit-log-noopt-")
     for i, oplist in enumerate(parts):
-        loop = parse(oplist, no_namespace=True)
+        loop = parse(oplist, no_namespace=True, nonstrict=True)
         num_ops = 0
         num_dmp = 0
         num_guards = 0
@@ -23,7 +23,10 @@
                 num_ops += 1
             if op.is_guard():
                 num_guards += 1
-        print "Loop #%d, length: %d, opcodes: %d, guards: %d, %f" % (i, num_ops, num_dmp, num_guards, num_ops/num_dmp)
+        if num_dmp == 0:
+            print "Loop #%d, length: %d, opcodes: %d, guards: %d" % (i, num_ops, num_dmp, num_guards)
+        else:
+            print "Loop #%d, length: %d, opcodes: %d, guards: %d, %f" % (i, num_ops, num_dmp, num_guards, num_ops/num_dmp)
 
 if __name__ == '__main__':
     main(sys.argv[1:])



More information about the Pypy-commit mailing list