[pypy-svn] r79498 - pypy/trunk/pypy/jit/backend/x86

fijal at codespeak.net fijal at codespeak.net
Thu Nov 25 10:45:00 CET 2010


Author: fijal
Date: Thu Nov 25 10:44:58 2010
New Revision: 79498

Modified:
   pypy/trunk/pypy/jit/backend/x86/assembler.py
Log:
Change a hack to use official interface


Modified: pypy/trunk/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/assembler.py	Thu Nov 25 10:44:58 2010
@@ -31,7 +31,8 @@
 from pypy.jit.backend.x86 import rx86, regloc, codebuf
 from pypy.jit.metainterp.resoperation import rop, ResOperation
 from pypy.jit.backend.x86.support import values_array
-from pypy.rlib.debug import debug_print, debug_start, debug_stop
+from pypy.rlib.debug import debug_print, debug_start, debug_stop,\
+     have_debug_prints
 from pypy.rlib import rgc
 from pypy.jit.backend.x86.jump import remap_frame_layout
 from pypy.jit.metainterp.history import ConstInt, BoxInt
@@ -228,11 +229,9 @@
                 self._build_float_constants()
             if hasattr(gc_ll_descr, 'get_malloc_fixedsize_slowpath_addr'):
                 self._build_malloc_fixedsize_slowpath()
-            s = os.environ.get('PYPYLOG')
-            if s:
-                if s.find(':') != -1:
-                    s = s.split(':')[-1]
-                self.set_debug(True)
+            debug_start('jit-backend-counts')
+            self.set_debug(have_debug_prints())
+            debug_stop('jit-backend-counts')
             # Intialize here instead of __init__ to prevent
             # pending_guard_tokens from being considered a prebuilt object,
             # which sometimes causes memory leaks since the prebuilt list is



More information about the Pypy-commit mailing list