[pypy-commit] pypy ppc-jit-backend: Add more debug infrastructure.

edelsohn noreply at buildbot.pypy.org
Tue Feb 14 21:08:09 CET 2012


Author: edelsohn
Branch: ppc-jit-backend
Changeset: r52473:2e331721bba6
Date: 2012-02-14 15:07 -0500
http://bitbucket.org/pypy/pypy/changeset/2e331721bba6/

Log:	Add more debug infrastructure.

diff --git a/pypy/jit/backend/ppc/ppc_assembler.py b/pypy/jit/backend/ppc/ppc_assembler.py
--- a/pypy/jit/backend/ppc/ppc_assembler.py
+++ b/pypy/jit/backend/ppc/ppc_assembler.py
@@ -48,6 +48,12 @@
 memcpy_fn = rffi.llexternal('memcpy', [llmemory.Address, llmemory.Address,
                                        rffi.SIZE_T], lltype.Void,
                             sandboxsafe=True, _nowrapper=True)
+
+DEBUG_COUNTER = lltype.Struct('DEBUG_COUNTER', ('i', lltype.Signed),
+                              ('type', lltype.Char),  # 'b'ridge, 'l'abel or
+                                                      # 'e'ntry point
+                              ('number', lltype.Signed))
+
 def hi(w):
     return w >> 16
 
@@ -110,6 +116,12 @@
         self.max_stack_params = 0
         self.propagate_exception_path = 0
         self.setup_failure_recovery()
+        self._debug = False
+        self.loop_run_counters = []
+        self.debug_counter_descr = cpu.fielddescrof(DEBUG_COUNTER, 'i')
+
+    def set_debug(self, v):
+        self._debug = v
 
     def _save_nonvolatiles(self):
         """ save nonvolatile GPRs in GPR SAVE AREA 


More information about the pypy-commit mailing list