[pypy-commit] pypy opcode-tracing-experiment: disable promotion of valuestack and a slightly different strategy

fijal noreply at buildbot.pypy.org
Mon Jul 23 12:53:19 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: opcode-tracing-experiment
Changeset: r56407:65aac2ef2095
Date: 2012-07-23 12:40 +0200
http://bitbucket.org/pypy/pypy/changeset/65aac2ef2095/

Log:	disable promotion of valuestack and a slightly different strategy

diff --git a/pypy/module/pypyjit/interp_jit.py b/pypy/module/pypyjit/interp_jit.py
--- a/pypy/module/pypyjit/interp_jit.py
+++ b/pypy/module/pypyjit/interp_jit.py
@@ -49,7 +49,7 @@
 #    return (bytecode.co_flags & CO_GENERATOR) != 0
 
 class PyPyJitDriver(JitDriver):
-    reds = ['next_instr', 'frame', 'ec', 'pycode']
+    reds = ['next_instr', 'frame', 'ec', 'pycode', 'prev_opcode']
     greens = ['is_being_profiled', 'opcode']
 #    virtualizables = ['frame']
 
@@ -68,15 +68,23 @@
         self = hint(self, access_directly=True)
         next_instr = r_uint(next_instr)
         is_being_profiled = self.is_being_profiled
+        opcode = pycode.co_code[next_instr]
         try:
             while True:
+                prev_opcode = opcode
                 opcode = pycode.co_code[next_instr]
+                pypyjitdriver.can_enter_jit(ec=ec,
+                    frame=self, next_instr=next_instr, pycode=pycode,
+                    is_being_profiled=is_being_profiled,
+                                            opcode=opcode,
+                                            prev_opcode=prev_opcode)
                 pypyjitdriver.jit_merge_point(ec=ec,
                     frame=self, next_instr=next_instr, pycode=pycode,
                     is_being_profiled=is_being_profiled,
-                                              opcode=opcode)
+                                              opcode=prev_opcode,
+                                              prev_opcode=prev_opcode)
                 co_code = pycode.co_code
-                self.valuestackdepth = hint(self.valuestackdepth, promote=True)
+                #self.valuestackdepth = hint(self.valuestackdepth, promote=True)
                 next_instr = self.handle_bytecode(co_code, next_instr, ec)
                 is_being_profiled = self.is_being_profiled
         except ExitFrame:


More information about the pypy-commit mailing list