Author: Remi Meier <remi.me...@gmail.com> Branch: stmgc-c4 Changeset: r68661:162a671c4f65 Date: 2014-01-14 10:43 +0100 http://bitbucket.org/pypy/pypy/changeset/162a671c4f65/
Log: treat OS_JIT_STM_SHOULD_BREAK_TRANSACTION as a non-collecting function in the jit diff --git a/rpython/jit/backend/llsupport/stmrewrite.py b/rpython/jit/backend/llsupport/stmrewrite.py --- a/rpython/jit/backend/llsupport/stmrewrite.py +++ b/rpython/jit/backend/llsupport/stmrewrite.py @@ -105,6 +105,14 @@ continue # ---------- calls ---------- if op.is_call(): + if opnum == rop.CALL and op.getdescr(): + d = op.getdescr() + assert isinstance(d, CallDescr) + ei = d.get_extra_info() + if ei and ei.oopspecindex == EffectInfo.OS_JIT_STM_SHOULD_BREAK_TRANSACTION: + self.newops.append(op) + continue + self.emitting_an_operation_that_can_collect() self.next_op_may_be_in_new_transaction() diff --git a/rpython/jit/backend/x86/assembler.py b/rpython/jit/backend/x86/assembler.py --- a/rpython/jit/backend/x86/assembler.py +++ b/rpython/jit/backend/x86/assembler.py @@ -2278,6 +2278,7 @@ cb = callbuilder.CallBuilder(self, arglocs[2], arglocs[3:], resloc) descr = op.getdescr() + effectinfo = descr.get_extra_info() assert isinstance(descr, CallDescr) cb.callconv = descr.get_call_conv() cb.argtypes = descr.get_arg_types() @@ -2289,7 +2290,9 @@ assert isinstance(signloc, ImmedLoc) cb.ressign = signloc.value - if is_call_release_gil: + if effectinfo and effectinfo.oopspecindex == EffectInfo.OS_JIT_STM_SHOULD_BREAK_TRANSACTION: + cb.emit_no_collect() + elif is_call_release_gil: cb.emit_call_release_gil() else: cb.emit() _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit