[pypy-commit] pypy stmgc-c4: Apply stm_ignored to this version of cell counters
arigo
noreply at buildbot.pypy.org
Fri Oct 4 07:04:43 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c4
Changeset: r67150:e208b4c38797
Date: 2013-10-04 06:42 +0200
http://bitbucket.org/pypy/pypy/changeset/e208b4c38797/
Log: Apply stm_ignored to this version of cell counters
diff --git a/rpython/jit/metainterp/warmstate.py b/rpython/jit/metainterp/warmstate.py
--- a/rpython/jit/metainterp/warmstate.py
+++ b/rpython/jit/metainterp/warmstate.py
@@ -7,6 +7,7 @@
from rpython.rlib.jit import PARAMETERS, BaseJitCell
from rpython.rlib.nonconst import NonConstant
from rpython.rlib.objectmodel import specialize, we_are_translated, r_dict
+from rpython.rlib.objectmodel import stm_ignored
from rpython.rlib.rarithmetic import intmask
from rpython.rlib.unroll import unrolling_iterable
from rpython.rtyper.annlowlevel import (hlstr, cast_base_ptr_to_instance,
@@ -326,8 +327,8 @@
return
# start tracing
from rpython.jit.metainterp.pyjitpl import MetaInterp
+ cell.mode = MODE_TRACING
metainterp = MetaInterp(metainterp_sd, jitdriver_sd)
- cell.mode = MODE_TRACING
try:
metainterp.compile_and_run_once(jitdriver_sd, *args)
finally:
@@ -346,9 +347,13 @@
if mode == MODE_COUNTING:
# update the profiling counter
- n = cell.counter + threshold
+ # use stm_ignored because keeping the absolutely exact value
+ # is not important, but avoiding pointless conflicts is
+ with stm_ignored:
+ n = cell.counter + threshold
if n <= self.THRESHOLD_LIMIT: # bound not reached
- cell.counter = n
+ with stm_ignored:
+ cell.counter = n
return
else:
bound_reached(cell, *args)
More information about the pypy-commit
mailing list