[pypy-svn] r64535 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp

fijal at codespeak.net fijal at codespeak.net
Tue Apr 21 18:07:32 CEST 2009


Author: fijal
Date: Tue Apr 21 18:07:32 2009
New Revision: 64535

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
Log:
if translated, logging only occurs with DEBUG flag set


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	Tue Apr 21 18:07:32 2009
@@ -26,10 +26,12 @@
     for arg in args:
         assert isinstance(arg, (Box, Const))
 
+DEBUG = False
+
 def log(msg):
     if we_are_translated():
         debug_print(msg)
-    else:
+    elif DEBUG:
         history.log.info(msg)
 
 class arguments(object):
@@ -1036,7 +1038,7 @@
         if not we_are_translated():
             history.log.event('ENTER' + self.history.extratext)
             self.staticdata.stats.enter_count += 1
-        else:
+        elif DEBUG:
             debug_print('~~~ ENTER', self.history.extratext)
         try:
             while True:
@@ -1044,7 +1046,7 @@
         finally:
             if not we_are_translated():
                 history.log.event('LEAVE' + self.history.extratext)
-            else:
+            elif DEBUG:
                 debug_print('~~~ LEAVE', self.history.extratext)
 
     def interpret(self):



More information about the Pypy-commit mailing list