[pypy-commit] pypy arm-backend-2: Add missing code to pass and respect the debug status. Fixes test_ztranslation.py:test_jit_get_stats
bivab
noreply at buildbot.pypy.org
Fri Aug 10 14:13:12 CEST 2012
Author: David Schneider <david.schneider at picle.org>
Branch: arm-backend-2
Changeset: r56688:1d6dcceca9d4
Date: 2012-08-10 12:12 +0000
http://bitbucket.org/pypy/pypy/changeset/1d6dcceca9d4/
Log: Add missing code to pass and respect the debug status. Fixes
test_ztranslation.py:test_jit_get_stats
diff --git a/pypy/jit/backend/arm/assembler.py b/pypy/jit/backend/arm/assembler.py
--- a/pypy/jit/backend/arm/assembler.py
+++ b/pypy/jit/backend/arm/assembler.py
@@ -70,7 +70,9 @@
self.debug_counter_descr = cpu.fielddescrof(DEBUG_COUNTER, 'i')
def set_debug(self, v):
+ r = self._debug
self._debug = v
+ return r
def _compute_stack_size(self):
self.STACK_FIXED_AREA = len(r.callee_saved_registers) * WORD
@@ -124,9 +126,13 @@
self._leave_jitted_hook_save_exc = \
self._gen_leave_jitted_hook_code(True)
self._leave_jitted_hook = self._gen_leave_jitted_hook_code(False)
- debug_start('jit-backend-counts')
- self.set_debug(have_debug_prints())
- debug_stop('jit-backend-counts')
+ if not self._debug:
+ # if self._debug is already set it means that someone called
+ # set_debug by hand before initializing the assembler. Leave it
+ # as it is
+ debug_start('jit-backend-counts')
+ self.set_debug(have_debug_prints())
+ debug_stop('jit-backend-counts')
def finish_once(self):
if self._debug:
diff --git a/pypy/jit/backend/arm/runner.py b/pypy/jit/backend/arm/runner.py
--- a/pypy/jit/backend/arm/runner.py
+++ b/pypy/jit/backend/arm/runner.py
@@ -22,6 +22,9 @@
AbstractLLCPU.__init__(self, rtyper, stats, opts,
translate_support_code, gcdescr)
+ def set_debug(self, flag):
+ return self.assembler.set_debug(flag)
+
def setup(self):
if self.opts is not None:
failargs_limit = self.opts.failargs_limit
More information about the pypy-commit
mailing list