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

fijal at codespeak.net fijal at codespeak.net
Thu Mar 11 22:27:40 CET 2010


Author: fijal
Date: Thu Mar 11 22:27:39 2010
New Revision: 72141

Modified:
   pypy/trunk/pypy/jit/tool/otherviewer.py
Log:
Fix


Modified: pypy/trunk/pypy/jit/tool/otherviewer.py
==============================================================================
--- pypy/trunk/pypy/jit/tool/otherviewer.py	(original)
+++ pypy/trunk/pypy/jit/tool/otherviewer.py	Thu Mar 11 22:27:39 2010
@@ -166,6 +166,7 @@
         raise Exception("Did not find")
 
 MAX_LOOPS = 300
+LINE_CUTOFF = 300
 
 def splitloops(loops):
     real_loops = []
@@ -225,8 +226,8 @@
         loop.ratio = float(opsno) / bcodes
     content = loop.content
     lines = content.split("\n")
-    if len(lines) > 100:
-        lines = lines[100:] + ["%d more lines..." % (len(lines) - 100)]
+    if len(lines) > LINE_CUTOFF:
+        lines = lines[:LINE_CUTOFF] + ["%d more lines..." % (len(lines) - LINE_CUTOFF)]
     for i, line in enumerate(lines):
         lines[i] = re.sub("\[.*\]", "", line)
     loop.content = "Logfile at %d\n" % loop.startlineno + "\n".join(lines)



More information about the Pypy-commit mailing list