[pypy-svn] r67910 - pypy/trunk/pypy/jit/metainterp

pedronis at codespeak.net pedronis at codespeak.net
Sat Sep 26 22:44:09 CEST 2009


Author: pedronis
Date: Sat Sep 26 22:44:09 2009
New Revision: 67910

Modified:
   pypy/trunk/pypy/jit/metainterp/jitprof.py
Log:
generic count function

Modified: pypy/trunk/pypy/jit/metainterp/jitprof.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/jitprof.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/jitprof.py	Sat Sep 26 22:44:09 2009
@@ -57,9 +57,11 @@
     def end_blackhole(self):
         pass
 
-    def count_ops(self, opnum, kind=OPS):
+    def count(self, kind, inc=1):
         pass
 
+    def count_ops(self, opnum, kind=OPS):
+        pass
 
 class Profiler(object):
     initialized = False
@@ -109,6 +111,9 @@
     def start_blackhole(self): self._start(BLACKHOLE)
     def end_blackhole(self):   self._end  (BLACKHOLE)
 
+    def count(self, kind, inc=1):
+        self.counters[kind] += inc        
+    
     def count_ops(self, opnum, kind=OPS):
         from pypy.jit.metainterp.resoperation import rop
         self.counters[kind] += 1



More information about the Pypy-commit mailing list