stmgc-c4

View source
stmgc-c4
  • Contributors
    1. Loading...
Author Commit Message Date Builds
250+ commits behind default.
Remi Meier
add failing test for possible optimization
Remi Meier
fix some stmrewrite things (mostly tests)
Remi Meier
completeness
Remi Meier
updated comment
Remi Meier
more correct removal of force_tokens and setfields
Remi Meier
also define flush() to maybe be more robust
Remi Meier
remove the forcing of virtualizables when we remove the stm_transaction_break
Remi Meier
add import..
Remi Meier
treat OS_JIT_STM_SHOULD_BREAK_TRANSACTION as a non-collecting function in the jit
Remi Meier
reintroduce the medium fastpath for PRIVATE_FROM_PROTECTED objects
Remi Meier
add a flag to jitdriver to mark it as transaction-break friendly -> reintroduces atomicity of bytecode instructions
Remi Meier
Backed out changeset c9086eff1e22 - misses check for GCFLAG_WRITE_BARRIER...
Remi Meier
add a medium slowpath for write-barriers on private_from_protected objects
Remi Meier
it was the impl in runner.py that was actually missing
Remi Meier
fix placing TB in bridge
Remi Meier
connect guard_not_forced with stm_transaction_break in regalloc/assembler
Remi Meier
add transaction breaks after guard_not_forced
Remi Meier
another test
Remi Meier
partly moved transaction break logic from pyjitpl to optimizeopt
Remi Meier
test and fix transaction break removal
Remi Meier
revert changes to assembler.py and start support of transaction breaks in optimizeopt
Remi Meier
add new llops to funcgen and change code generation in assembler
Remi Meier
another test, more fixes
Remi Meier
write a test and fix
Remi Meier
WIP: make stm_transaction_break a guard
Remi Meier
Mark some more llops as canmallocgc. It may have been working before but this is more correct.
Remi Meier
missing emitting_an_operation_that_can_collect() for the inevitable-fallback
Remi Meier
import stmgc with various fixes
Remi Meier
import stmgc
Remi Meier
import stmgc
Remi Meier
after a transaction break, we need to check for invalidation again
Remi Meier
fix: put the stm_break_wanted flag on metainterp instead of MIFrame
Remi Meier
WIP introduction of explicit jit_stm_transaction_break_point() placement in pypy to ensure bytecode instruction atomicity. (also fixes always_inevitable in stmrewrite.py)
Remi Meier
Add missing canmallocgcs. Ops that don't do malloc but can contain a GC safe- point (e.g. BecomeInevitable) need to have canmallocgc=True...
Remi Meier
fix for threadlocal access. It was missing barriers and push_roots.
Remi Meier
non-gc arrays mustn't get a barrier (getarraysize)
Remi Meier
Disable use of immutable read barriers in most cases. Since there can be a transaction break between allocation and initialization of the immutable field...
Remi Meier
disable micronumpy (delay debugging this issue)
Remi Meier
for buildbot: last commit wasn't enough, next try by making -Ojit imply --stm
Remi Meier
for buildbot: make --stm a default option
Remi Meier
Add some stop_all_other_threads sections to compile.py. May be completely unnecessary...
Remi Meier
import stmgc that allows nesting of stop_all_other_threads()-resume_..
Remi Meier
import stmgc (contains important fix regarding new thread locals)
Remi Meier
add some debug prints to stmrewrite (print ops that use the fallback to inevitable, intentionally or not)
Remi Meier
push gc roots around stm_set_transaction_length and stm_inspect_abort_info too
Remi Meier
make sure roots are pushed around jit_assembler_call and barriers get invalidated around it and stm_partial_commit_and_resume_other_threads
Remi Meier
atomically patch assembler by stopping & aborting all other transactions during raw patching.
Remi Meier
import stmgc with stop_all_other_threads() and partial commit for inevitable transactions
Remi Meier
updated TODO
Remi Meier
Use the right type of arguments for dg_dtoa. They were too small but probably worked because of alignment.
Remi Meier
import stmgc with valgrind modifications
Remi Meier
TODO update
Remi Meier
reenable withmapdict option (often a 2x speedup)
Remi Meier
import stmgc (fastpaths for stm_pointer_equal(_prebuilt))
Remi Meier
fix previous fix for debug_merge_point (always turned inevitable)
Remi Meier
implement stm_pointer_equal directly in the slowpath (less register saving overhead)
Remi Meier
jitlogparser output improvement
Remi Meier
don't remove debug_merge_points in stmrewrite (for jitlog)
Remi Meier
stupid
Remi Meier
improve code generation for transaction_break and pointer_equal
Remi Meier
add missing string resops that really need barriers in stmrewrite
Remi Meier
import stmgc with better constptr allocation
Remi Meier
fix missing invalidation of read status when doing a A2V barrier
Remi Meier
import stmgc
Remi Meier
implement the additional barriers with fastpaths in assembler.py and gc.py
Remi Meier
add tests for immutable getfields and noptr setfields
Remi Meier
start introducing the rest of the barriers: A2V, A2I, etc. (WIP)
Remi Meier
test and fix repeat_barriers
Remi Meier
fix stm_integration_tests and start implementing repeated barriers in assembler
Remi Meier
start implementing repeated write and read barriers in stmrewrite and gc (WIP)
Remi Meier
fix now unnecessary PUSH
Remi Meier
move the call to stm_transaction_break() into separately piece (not inlined in trace anymore)
Remi Meier
make transaction breaks after calls simply check for stm_active==2 in order to break the transaction if it is inevitable
Remi Meier
use new thread-locals for better nursery-fastpath
Remi Meier
import stmgc with new thread-locals (needs next commit to work)
Remi Meier
update TODO
Remi Meier
undo the not-break-in-loop-body
Remi Meier
fix little mistake in stmrewrite and make it not emit transaction breaks in loops (except before JUMP)
Remi Meier
adapt tests to stm in test_stmrewrite.py
Remi Meier
start implementing fastpath for nursery allocations (WIP) copy over rewrite tests for stm (need fixing)
Remi Meier
import stmgc for nursery optimizations in JIT
Remi Meier
remove unnecessary write barrier on jitframe
Remi Meier
update TODO
Remi Meier
Add stm_transaction_break after CALL ops in stmrewrite. That way inevitable transactions causes by the calls will be much shorter and less likely to go on into atomic blocks.
Remi Meier
attempt to fix for trying to patch the JMP target of a guard twice
Remi Meier
seems to fix one bug - reload frame after stm_invalidate_jmp_buf
Remi Meier
logging fixes: use the right loop number
Remi Meier
forgotten in last commit
Remi Meier
test and fix extract_category for rewritten and noopt traces
Armin Rigo
Silence a warning
Armin Rigo
import stmgc/9149deb7e746
Armin Rigo
Fix: cannot put the BUSY flag in the same counter modified in 'stm_ignored' mode. We end up in cases where the guard's code is compiled twice, which crashes later in the x86 backend.
Armin Rigo
Actually even reads of GC pointers would need special care
Armin Rigo
Use stm_ignored on the guard counters too.
Armin Rigo
Apply stm_ignored to this version of cell counters
Armin Rigo
Should carefully have no effect: split the double-meaning of the 'counter' on Cell objects in two fields.
Armin Rigo
Fix for e6fe5ef81974
Armin Rigo
Use stm_ignored here
Armin Rigo
Add 'with stm_ignored:' to not track in stm the reads and writes to GC objects
Armin Rigo
fix: 127 bytes is not enough here
Armin Rigo
Fix: need to correctly save the gcmap and restore the frame around this call
Armin Rigo
fix
Armin Rigo
update to stmgc/d78107007cab
Armin Rigo
Save and restore stm_shadowstack.
Armin Rigo
update to stmgc/ad70e2445849
Armin Rigo
Fix
Armin Rigo
in-progress: call stm_transaction_break() from within the jit-produced code
Armin Rigo
Don't force inevitable when doing a raw getfield/setfield if the struct has 'stm_dont_track_raw_accesses'.
Armin Rigo
Port the trick from pypysig_getaddr_occurred() to the two other functions (which were not used far).
Armin Rigo
Try to revert module/signal and use a 'stm_dont_track_raw_accesses' flag on the result of pypysig_getaddr_occurred() instead.
Armin Rigo
Update to stmgc/6184784a65a0
Remi Meier
stm: remove redundant fallback to inevitable in stmrewrite
Remi Meier
slightly better code-generation for ptr_eq in case of NULL checks
Armin Rigo
import stmgc/111c09337109
Armin Rigo
import stmgc/4ed9ba1552f8 and hack to always print aborts
Remi Meier
little fix to always release a spinlock
Remi Meier
turn inevitable before calls that don't have an effectinfo (to be safe)
Armin Rigo
Baaah. jit_assembler_call() needs to say canmallocgc=True. To be on the safe side, also say canraise=Exc. I guess that indirect_call is special-cased by various anaysis, but not jit_assembler_call.
Armin Rigo
import stmgc/0b3f7830cb46
Remi Meier
2 more tests just to be sure
Armin Rigo
Argh, thanks Remi. We're going to rename this obscure name.
Armin Rigo
Redo this hack
Armin Rigo
Fix the test
Armin Rigo
import stmgc/c5636881b4d5
Armin Rigo
merge heads
Armin Rigo
Fix dtoa.c to use stm_call_on_abort(), which makes the code transactionsafe again.
Armin Rigo
import stmgc/983af03354a5
Remi Meier
merge
Remi Meier
try to reduce becomeinevitable because of indirect_calls in blackhole.py (call_stub)
Armin Rigo
Don't force the frame for the JIT. Temporary workaround.
Armin Rigo
hg merge default
Armin Rigo
Disable stack-checking "more", with STM. In particular, avoid calls to LL_stack_criticalcode_start(), turning the transaction inevitable.
Armin Rigo
do_malloc_xx_clear(), used in the JIT
Armin Rigo
Waa, this made gcc produce a warning: "/*" within comment
Armin Rigo
A test and small fixes for gc_writebarrier in stm.
Armin Rigo
hg merge default
Armin Rigo
hg merge default
Armin Rigo
The indirect_call() going to assembler code forces the transaction to become inevitable. The only way I can think of to avoid this is to add a new operation.
Armin Rigo
Fixes: in raw_load/raw_store, we don't know what kind of type the 1st argument has. It could be a GCREF, or a Signed or an Address.
Armin Rigo
Add raw_load and raw_store here, to generate the correct barriers when applied on GC objects.
Armin Rigo
hg merge default
Armin Rigo
Fix
Armin Rigo
Handle gc_writebarrier in stm/writebarrier.py
Armin Rigo
Debugging: always fprintf the inevitable reasons
Armin Rigo
Crash more cleanly when trying to translate on 32-bit (duh)
Armin Rigo
Make the raw JITFRAMEINFO STM-free, by using only one field in case of STM and by updating its value carefully with bool_cas().
Armin Rigo
import stmgc/698910c9edc3
Armin Rigo
Yes, it was a fix. Here's the test.
Armin Rigo
Fix?
Armin Rigo
Fix raw mallocs to be freed in case of an abort occurring at the wrong time.
Armin Rigo
rstm.charp_inspect_abort_info() now turns the transaction inevitable. Must move the call to it after abort_and_retry() in the test.
Armin Rigo
import stmgc/782ebd6afc03
Armin Rigo
merge heads
Armin Rigo
Import stmgc/4c80cba2b8ce
Armin Rigo
Remove clear_exception_data_on_abort() and piggy-back calls to stm_clear_on_abort() to stm_initialize().
Armin Rigo
Rewrite this part
Armin Rigo
Don't use None as category. This should ensure that all categories are decreasing over time, eventually reaching a fixed point.
Armin Rigo
This may fix the order dependency.
Remi Meier
cleanup of thread-local code in assembler.py
Remi Meier
import stmgc
Remi Meier
merge default and fix "__thread before static" error in debug_print.c
Armin Rigo
merge heads
Armin Rigo
Make the __thread in these files only appear in stm mode.
Armin Rigo
Make the __thread in these files only appear in stm mode.
Armin Rigo
Re-enable printing conflicts, which seems to work fine now.
Armin Rigo
Import stmgc/24b6be3aaa67
Remi Meier
more jit.dont_look_inside needed after merge
Armin Rigo
the call to report_abort_info() is disabled for now because it's buggy
Armin Rigo
Fix
Armin Rigo
Fix
Armin Rigo
More fixes
Armin Rigo
Fix test
Armin Rigo
Fix
Armin Rigo
fix test
Armin Rigo
Fix for test_zll_stress_*.
Armin Rigo
Argh argh argh! This comes from an insufficiently-tested checkin by me long ago. :-(
Armin Rigo
Use a regexp to drop the "1#" at the start of stm pypylog files. Otherwise, it would drop everything before a "#" used as a comment.
Armin Rigo
Fix
Armin Rigo
Skip this test when running on top of CPython
Armin Rigo
merge heads
Armin Rigo
Fix
Remi Meier
fix bogus test
Armin Rigo
Accept DelayedPointers here too
Armin Rigo
Fix for test_lloperation
Armin Rigo
Merge fix
Armin Rigo
More merge fixes
Armin Rigo
Fix
Armin Rigo
Fix for running most non-stm C tests
Remi Meier
fix some merge leftovers
Remi Meier
remove duplicated logging
Armin Rigo
Fix? But the test is still failing
Armin Rigo
hg merge default Lots of changes, needs careful testing
Armin Rigo
Remove this test, not working any more since a while
Remi Meier
import stmgc
Remi Meier
import stmgc
Remi Meier
Merge
Remi Meier
try to fix test_stm_integration.py
Armin Rigo
'weakref_deref' needs an immutable read barrier
Remi Meier
prefix debug lines with the thread number during testing
Remi Meier
add comment
Remi Meier
move rgc.no_release_gil to backendopt
Remi Meier
add rgc.no_release_gil to places that may access the prebuilt assembler object
Remi Meier
add support for instantiate_call to rgc.no_release_gil
Remi Meier
in-progress fixes to test_stm_integration
Remi Meier
import stmgc
Remi Meier
threadlocal_base() should not be threadsafe (and release the gil)
Remi Meier
implement rgc.no_release_gil
Remi Meier
merge static-write-barriers
Remi Meier
import stmgc
Remi Meier
cleanup for last fix
Remi Meier
fix bug where spilled references do not get updated by stm barriers
Remi Meier
import stmgc
Remi Meier
some pure operations need barriers (stmrewrite.py)
Armin Rigo
import stmgc/c83f63e68ab7
Armin Rigo
For now, withmapdict=True doesn't really make sense with STM, so don't enable it if we select both STM and the JIT.
Armin Rigo
hg merge stmgc-c4
Armin Rigo
import stmgc/e14cbe1e040b
Armin Rigo
Add a (failing) test: most operations with GC in their name need to be explicitly handled by stmrewrite. This is a hack but it gives some future-proofing against adding new GC operations and forgetting that they need special STM support.
Armin Rigo
import stmgc/c7b63aa9d1ad
Armin Rigo
import stmgc/7b20231c8672
Armin Rigo
Hack to avoid the algorithm getting stuck (maybe)
Armin Rigo
Fixes
Armin Rigo
Do some whole-graph analysis.
Armin Rigo
No-op: refactoring
Armin Rigo
Improve generation of write barriers: we only need to check GCFLAG_WRITEBARRIER when we're writing a GC pointer into the object.
Remi Meier
fix an error in richards.py caused by missing barriers in llmodel.py
Armin Rigo
Add a XXX about that case
Remi Meier
remove gcref mess (test_stm_integration runs again)
Armin Rigo
test_cast_gcref_to_int: when running untranslated, accept also _llgcopaque objects and force a cast to integer.
Remi Meier
in-progress
Remi Meier
use test8 instead of cmp8
Remi Meier
fix for ptr_eq because a function returning _Bool only sets the lower 8 bits of the return value
Remi Meier
stmgc import
Remi Meier
extend test (fails now :( )
Remi Meier
start using allocate_public_integer_address. Breaks tests in test_stm_integration.py...
Remi Meier
the revision too...
Remi Meier
import stmgc with with allocate_public_integer_address
Remi Meier
fix that test so it makes sense
Armin Rigo
Add a test that actually shows that GCREFs work, even if slightly inefficiently --- which is probably fine.
Armin Rigo
Fix the test
Armin Rigo
Test failing because of the XXX in writebarrier.py
Armin Rigo
import stmgc/50d9d16d6327
Armin Rigo
If gcremovetypeptr, we can access directly the typeptr field even on a stub.
Armin Rigo
Prebuilt objects cannot be stubs.
Armin Rigo
import stmgc/edbd90784082
Armin Rigo
Fix barrier choice
Armin Rigo
Finish generating all new barrier combinations
Armin Rigo
in-progress: use the 5 barriers
Remi Meier
trying to find all locations where gcrefs are encoded in the trace and make them non-movable.
Remi Meier
avoid deadlock by transaction committing and another one because a call to stmcb_size() could call become_inevitable()
966 commits not shown.