Commits

David Schneider  committed 1d6dcce

Add missing code to pass and respect the debug status. Fixes test_ztranslation.py:test_jit_get_stats

  • Participants
  • Parent commits d8f3bbe
  • Branches arm-backend-2

Comments (0)

Files changed (2)

File pypy/jit/backend/arm/assembler.py

         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
         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:

File pypy/jit/backend/arm/runner.py

         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