[pypy-commit] pypy stmgc-c4: Mark some more llops as canmallocgc. It may have been working before but this

Remi Meier noreply at buildbot.pypy.org
Fri Dec 20 09:08:39 CET 2013


Author: Remi Meier
Branch: stmgc-c4
Changeset: r68507:a49c63960e2f
Date: 2013-12-20 09:07 +0100
http://bitbucket.org/pypy/pypy/changeset/a49c63960e2f/

Log:	Mark some more llops as canmallocgc. It may have been working before
	but this is more correct.

diff --git a/rpython/jit/backend/llsupport/assembler.py b/rpython/jit/backend/llsupport/assembler.py
--- a/rpython/jit/backend/llsupport/assembler.py
+++ b/rpython/jit/backend/llsupport/assembler.py
@@ -348,14 +348,12 @@
         next.prev = prev
 
     @staticmethod
-    @rgc.no_collect
     def _release_gil_shadowstack():
         before = rffi.aroundstate.before
         if before:
             before()
 
     @staticmethod
-    @rgc.no_collect
     def _reacquire_gil_shadowstack():
         after = rffi.aroundstate.after
         if after:
diff --git a/rpython/rtyper/lltypesystem/lloperation.py b/rpython/rtyper/lltypesystem/lloperation.py
--- a/rpython/rtyper/lltypesystem/lloperation.py
+++ b/rpython/rtyper/lltypesystem/lloperation.py
@@ -415,8 +415,8 @@
     #       possible GC safe-points! (also sync with stmframework.py)
     # (some ops like stm_commit_transaction don't need it because there
     #  must be no gc-var access afterwards anyway)
-    'stm_initialize':         LLOp(),
-    'stm_finalize':           LLOp(),
+    'stm_initialize':         LLOp(canmallocgc=True),
+    'stm_finalize':           LLOp(canmallocgc=True),
     'stm_barrier':            LLOp(sideeffects=False),
     'stm_allocate':           LLOp(sideeffects=False, canmallocgc=True),
     'stm_allocate_nonmovable_int_adr': LLOp(sideeffects=False, canmallocgc=True),
@@ -431,16 +431,16 @@
     'stm_hash':               LLOp(sideeffects=False),
     'stm_push_root':          LLOp(),
     'stm_pop_root_into':      LLOp(),
-    'stm_commit_transaction': LLOp(),
-    'stm_begin_inevitable_transaction': LLOp(),
+    'stm_commit_transaction': LLOp(canmallocgc=True),
+    'stm_begin_inevitable_transaction': LLOp(canmallocgc=True),
     'stm_should_break_transaction': LLOp(sideeffects=False),
     'stm_set_transaction_length': LLOp(canmallocgc=True),
     'stm_change_atomic':      LLOp(),
     'stm_get_atomic':         LLOp(sideeffects=False),
     'stm_perform_transaction':LLOp(canmallocgc=True),
-    'stm_enter_callback_call':LLOp(),
-    'stm_leave_callback_call':LLOp(),
-    'stm_abort_and_retry':    LLOp(),
+    'stm_enter_callback_call':LLOp(canmallocgc=True),
+    'stm_leave_callback_call':LLOp(canmallocgc=True),
+    'stm_abort_and_retry':    LLOp(canmallocgc=True),
 
     'stm_weakref_allocate':   LLOp(sideeffects=False, canmallocgc=True),
     
@@ -524,7 +524,7 @@
     'jit_assembler_call': LLOp(canrun=True,   # similar to an 'indirect_call'
                                canraise=(Exception,),
                                canmallocgc=True),
-    'jit_stm_transaction_break_point' : LLOp(),
+    'jit_stm_transaction_break_point' : LLOp(canmallocgc=True),
 
     # __________ GC operations __________
 
diff --git a/rpython/translator/stm/breakfinder.py b/rpython/translator/stm/breakfinder.py
--- a/rpython/translator/stm/breakfinder.py
+++ b/rpython/translator/stm/breakfinder.py
@@ -7,6 +7,7 @@
     'stm_perform_transaction',
     'stm_partial_commit_and_resume_other_threads', # new priv_revision
     'jit_assembler_call',
+    'jit_stm_transaction_break_point',
     ])
 
 


More information about the pypy-commit mailing list