[pypy-commit] pypy jit-counter: Translation fix
arigo
noreply at buildbot.pypy.org
Thu Oct 31 22:42:05 CET 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: jit-counter
Changeset: r67789:9fcd5058364e
Date: 2013-10-31 22:41 +0100
http://bitbucket.org/pypy/pypy/changeset/9fcd5058364e/
Log: Translation fix
diff --git a/rpython/jit/metainterp/counter.py b/rpython/jit/metainterp/counter.py
--- a/rpython/jit/metainterp/counter.py
+++ b/rpython/jit/metainterp/counter.py
@@ -25,14 +25,16 @@
self._nextindex = r_uint(0)
#
if translator is not None:
- self._decay_phase = 0
+ class Glob:
+ step = 0
+ glob = Glob()
def invoke_after_minor_collection():
# After 64 minor collections, we call decay_all_counters().
# The "--jit decay=N" option measures the amount the
# counters are then reduced by.
- self._decay_phase += 1
- if self._decay_phase == 64:
- self._decay_phase = 0
+ glob.step += 1
+ if glob.step == 64:
+ glob.step = 0
self.decay_all_counters()
if not hasattr(translator, '_jit2gc'):
translator._jit2gc = {}
More information about the pypy-commit
mailing list