[pypy-svn] r40814 - pypy/dist/pypy/jit/timeshifter

xoraxax at codespeak.net xoraxax at codespeak.net
Tue Mar 20 10:53:36 CET 2007


Author: xoraxax
Date: Tue Mar 20 10:53:35 2007
New Revision: 40814

Modified:
   pypy/dist/pypy/jit/timeshifter/hrtyper.py
Log:
Only show the op timeshifter status every 5 %.

Modified: pypy/dist/pypy/jit/timeshifter/hrtyper.py
==============================================================================
--- pypy/dist/pypy/jit/timeshifter/hrtyper.py	(original)
+++ pypy/dist/pypy/jit/timeshifter/hrtyper.py	Tue Mar 20 10:53:35 2007
@@ -65,6 +65,7 @@
         self.timeshift_mapping = {}
         self.sigs = {}
         self.dispatchsubclasses = {}
+        self.old_percentage = 0
 
         (self.s_JITState,
          self.r_JITState)      = self.s_r_instanceof(rtimeshift.JITState)
@@ -425,9 +426,12 @@
             self.specialize_block(block)
             self.blockcount += 1
             if self.blockcount % 100 == 0:
-                self.log.event("Timeshifted ops in %d blocks, %d/%d graphs" %
-                               (self.blockcount, self.graphcount,
-                                self.ngraphs))
+                percentage = 100 * self.graphcount / self.ngraphs
+                if percentage >= self.old_percentage + 5:
+                    self.old_percentage = percentage
+                    self.log.event("Timeshifted ops in %d blocks, %d/%d graphs (%d %%)" %
+                                   (self.blockcount, self.graphcount,
+                                    self.ngraphs, percentage))
         self.graphcount += 1                
         # "normalize" the graphs by putting an explicit v_jitstate variable
         # everywhere



More information about the Pypy-commit mailing list