[pypy-svn] r52917 - in pypy/branch/jit-hotpath/pypy: jit/rainbow translator

arigo at codespeak.net arigo at codespeak.net
Tue Mar 25 16:21:01 CET 2008


Author: arigo
Date: Tue Mar 25 16:20:59 2008
New Revision: 52917

Modified:
   pypy/branch/jit-hotpath/pypy/jit/rainbow/hotpath.py
   pypy/branch/jit-hotpath/pypy/translator/driver.py
Log:
Be slightly less verbose by default in --jit translated interpreters.


Modified: pypy/branch/jit-hotpath/pypy/jit/rainbow/hotpath.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/rainbow/hotpath.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/rainbow/hotpath.py	Tue Mar 25 16:20:59 2008
@@ -21,7 +21,8 @@
 class HotRunnerDesc:
 
     def __init__(self, hintannotator, rtyper, entryjitcode, RGenOp,
-                 codewriter, jitdrivercls, translate_support_code = True):
+                 codewriter, jitdrivercls, translate_support_code = True,
+                 verbose_level=3):
         self.hintannotator = hintannotator
         self.entryjitcode = entryjitcode
         self.rtyper = rtyper
@@ -32,6 +33,7 @@
         self.codewriter = codewriter
         self.jitdrivercls = jitdrivercls
         self.translate_support_code = translate_support_code
+        self.verbose_level = verbose_level
 
     def _freeze_(self):
         return True
@@ -86,7 +88,8 @@
             if counter >= 0:
                 counter += 1
                 if counter < self.jitdrivercls.getcurrentthreshold():
-                    interpreter.debug_trace("jit_not_entered", *args)
+                    if self.verbose_level >= 3:
+                        interpreter.debug_trace("jit_not_entered", *args)
                     state.counters[argshash] = counter
                     return
                 interpreter.debug_trace("jit_compile", *args[:num_green_args])
@@ -96,7 +99,8 @@
                 mc = state.machine_codes.get(greenkey, state.NULL_MC)
             if not mc:
                 return
-            interpreter.debug_trace("run_machine_code", *args)
+            if self.verbose_level >= 2:
+                interpreter.debug_trace("run_machine_code", *args)
             run = maybe_on_top_of_llinterp(exceptiondesc, mc)
             residualargs = state.make_residualargs(*args[num_green_args:])
             run(*residualargs)

Modified: pypy/branch/jit-hotpath/pypy/translator/driver.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/translator/driver.py	(original)
+++ pypy/branch/jit-hotpath/pypy/translator/driver.py	Tue Mar 25 16:20:59 2008
@@ -442,7 +442,8 @@
             jitdrivercls = ha.jitdriverclasses.keys()[0] # hack
             hotrunnerdesc = HotRunnerDesc(ha, rtyper, jitcode, RGenOp,
                                           writer, jitdrivercls,
-                                          translate_support_code=True)
+                                          translate_support_code=True,
+                                          verbose_level=1)
             hotrunnerdesc.rewrite_all()
             from pypy.jit.rainbow import graphopt
             graphopt.simplify_virtualizable_accesses(writer)



More information about the Pypy-commit mailing list