Author: Remi Meier <[email protected]>
Branch: stmgc-c4
Changeset: r67868:002a6ee25259
Date: 2013-11-06 19:53 +0100
http://bitbucket.org/pypy/pypy/changeset/002a6ee25259/
Log: Add some stop_all_other_threads sections to compile.py. May be
completely unnecessary...
diff --git a/rpython/jit/metainterp/compile.py
b/rpython/jit/metainterp/compile.py
--- a/rpython/jit/metainterp/compile.py
+++ b/rpython/jit/metainterp/compile.py
@@ -16,6 +16,7 @@
from rpython.jit.metainterp.inliner import Inliner
from rpython.jit.metainterp.resume import NUMBERING, PENDINGFIELDSP,
ResumeDataDirectReader
from rpython.jit.codewriter import heaptracker, longlong
+from rpython.rlib import rstm
def giveup():
@@ -248,12 +249,17 @@
for box in loop.inputargs:
assert isinstance(box, Box)
+ if rgc.stm_is_enabled():
+ rstm.stop_all_other_threads()
target_token = loop.operations[-1].getdescr()
resumekey.compile_and_attach(metainterp, loop)
target_token = label.getdescr()
assert isinstance(target_token, TargetToken)
record_loop_or_bridge(metainterp_sd, loop)
+ if rgc.stm_is_enabled():
+ rstm.partial_commit_and_resume_other_threads()
+
return target_token
def patch_new_loop_to_load_virtualizable_fields(loop, jitdriver_sd):
@@ -899,9 +905,13 @@
if new_trace.operations[-1].getopnum() != rop.LABEL:
# We managed to create a bridge. Dispatch to resumekey to
# know exactly what we must do (ResumeGuardDescr/ResumeFromInterpDescr)
+ if rgc.stm_is_enabled():
+ rstm.stop_all_other_threads()
target_token = new_trace.operations[-1].getdescr()
resumekey.compile_and_attach(metainterp, new_trace)
record_loop_or_bridge(metainterp_sd, new_trace)
+ if rgc.stm_is_enabled():
+ rstm.partial_commit_and_resume_other_threads()
return target_token
else:
metainterp.retrace_needed(new_trace)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit