Author: Remi Meier <remi.me...@inf.ethz.ch> Branch: stmgc-c8-gcc Changeset: r78657:bd074f735670 Date: 2015-07-24 17:38 +0200 http://bitbucket.org/pypy/pypy/changeset/bd074f735670/
Log: another attempt to fix things (unsuccessfully) diff --git a/rpython/memory/gctransform/stmframework.py b/rpython/memory/gctransform/stmframework.py --- a/rpython/memory/gctransform/stmframework.py +++ b/rpython/memory/gctransform/stmframework.py @@ -212,6 +212,30 @@ self.default(hop) self.pop_roots(hop, livevars) + + # sync with lloperation.py: + # These operations need roots pushed around their execution. + # stm_allocate_* should never be seen here and are handled by + # the super class through gct_malloc_** and similar. + gct_stm_unregister_thread_local = _gct_with_roots_pushed + gct_stm_collect = _gct_with_roots_pushed + gct_stm_become_inevitable = _gct_with_roots_pushed + gct_stm_enter_transactional_zone = _gct_with_roots_pushed + gct_stm_leave_transactional_zone = _gct_with_roots_pushed + gct_stm_abort_and_retry = _gct_with_roots_pushed + gct_stm_enter_callback_call = _gct_with_roots_pushed + gct_stm_leave_callback_call = _gct_with_roots_pushed + gct_stm_transaction_break = _gct_with_roots_pushed + gct_stm_stop_all_other_threads = _gct_with_roots_pushed + gct_stm_hint_commit_soon = _gct_with_roots_pushed + gct_stm_hashtable_read = _gct_with_roots_pushed + gct_stm_hashtable_write = _gct_with_roots_pushed + gct_stm_hashtable_lookup = _gct_with_roots_pushed + gct_stm_queue_get = _gct_with_roots_pushed + gct_stm_queue_put = _gct_with_roots_pushed + gct_stm_queue_join = _gct_with_roots_pushed + + def gct_stm_malloc_nonmovable(self, hop): op = hop.spaceop PTRTYPE = op.result.concretetype @@ -229,14 +253,7 @@ self.pop_roots(hop, livevars) hop.genop("cast_opaque_ptr", [v_result], resultvar=op.result) - # sync with lloperation.py - gct_stm_become_inevitable = _gct_with_roots_pushed - gct_stm_hint_commit_soon = _gct_with_roots_pushed - gct_stm_stop_all_other_threads = _gct_with_roots_pushed - gct_stm_transaction_break = _gct_with_roots_pushed - gct_stm_collect = _gct_with_roots_pushed - gct_stm_queue_get = _gct_with_roots_pushed - gct_stm_queue_join = _gct_with_roots_pushed + class StmRootWalker(BaseRootWalker): 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 @@ -414,7 +414,7 @@ # (some ops like stm_commit_transaction don't need it because there # must be no gc-var access afterwards anyway) 'stm_register_thread_local': LLOp(), - 'stm_unregister_thread_local': LLOp(), + 'stm_unregister_thread_local': LLOp(canmallocgc=True), 'stm_read': LLOp(), 'stm_write': LLOp(), 'stm_can_move': LLOp(), @@ -438,7 +438,7 @@ 'stm_leave_transactional_zone': LLOp(canmallocgc=True), 'stm_abort_and_retry': LLOp(canmallocgc=True), 'stm_enter_callback_call': LLOp(canmallocgc=True), - 'stm_leave_callback_call': LLOp(), + 'stm_leave_callback_call': LLOp(canmallocgc=True), 'stm_transaction_break': LLOp(canmallocgc=True, canrun=True), 'stm_should_break_transaction': LLOp(sideeffects=False), 'stm_rewind_jmp_frame': LLOp(canrun=True), @@ -474,9 +474,9 @@ 'stm_hashtable_create': LLOp(), 'stm_hashtable_free': LLOp(), - 'stm_hashtable_read': LLOp(), - 'stm_hashtable_write': LLOp(), - 'stm_hashtable_lookup': LLOp(), + 'stm_hashtable_read': LLOp(canmallocgc=True), + 'stm_hashtable_write': LLOp(canmallocgc=True), + 'stm_hashtable_lookup': LLOp(canmallocgc=True), 'stm_hashtable_write_entry': LLOp(), 'stm_hashtable_length_upper_bound': LLOp(), 'stm_hashtable_list' : LLOp(), @@ -485,7 +485,7 @@ 'stm_queue_create': LLOp(), 'stm_queue_free': LLOp(), 'stm_queue_get': LLOp(canmallocgc=True), # push roots! - 'stm_queue_put': LLOp(), + 'stm_queue_put': LLOp(canmallocgc=True), 'stm_queue_task_done': LLOp(), 'stm_queue_join': LLOp(canmallocgc=True), # push roots! 'stm_queue_tracefn': LLOp(), _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit