stm

View source
stm
  • Contributors
    1. Loading...
Author Commit Message Date Builds
250+ commits behind default.
Armin Rigo
A version of the cache that models a hardware L1 cache. (disabled by default because it's buggy in subtle cases)
Armin Rigo
Ignore epoll_wait() returning EINTR.
Armin Rigo
Add a test and, for now, fix the emulation to match the real code's behavior. Maybe at some point we want instead the opposite behavior, but it's unclear.
Armin Rigo
Python 2.5 compat.
Armin Rigo
hg merge default
Armin Rigo
Add an emulator for "transaction", running serially and dispatching events in random order.
Armin Rigo
Fix the case of lltype.FixedSizeArray.
Armin Rigo
Fix test.
Armin Rigo
(fijal, arigo) Fix for transaction/test/test_ztranslation.
Armin Rigo
(fijal looking, arigo) Start add_epoll() which gives an integration between epoll objects and the transaction module. See test for a demo.
Armin Rigo
merge heads
Armin Rigo
Comment out this, as it doesn't work reliably.
Armin Rigo
hg merge default
Armin Rigo
Missing import.
Armin Rigo
Write down a next test, not implemented so far.
Armin Rigo
Adjust PyFrame and the stm transformer.
Armin Rigo
Add a new type of immutability: "mutable owned".
Armin Rigo
Finish the previous checkin.
Armin Rigo
Directly access also any array present as a field on the stm_access_directly object.
Armin Rigo
Give this flag to PyFrames. Write in TODO.txt the issues that this opens.
Armin Rigo
Use _stm_access_directly_ to mean that all field accesses should be direct. Should be combined with some form of locking.
Armin Rigo
Propagate this flag from the RPython class.
Armin Rigo
Implement proper immutability detection in {get,set}interiorfield(). This lets *all* our RPython-level 'string[index]' be considered as immutable reads, which is likely essential for performance.
Armin Rigo
Must also be supported if the outermost container is an array.
Armin Rigo
Simplify.
Armin Rigo
Add an official way to ask some Struct whether a {get,set}interiorfield() targets an immutable field or not.
Armin Rigo
More tests.
Armin Rigo
Make the ExecutionContext again a thread-local. See comments.
Armin Rigo
Use thread_id() from stm instead of the one from threads.
Armin Rigo
More hacking...
Armin Rigo
add the stm_thread_id() helper
Armin Rigo
print the numeric reason when aborting.
Armin Rigo
Hacks to make checkmodule() work.
Armin Rigo
Add an explicit fifo queue implementation, instead of using list.pop(0).
Armin Rigo
Oups.
Armin Rigo
Fix test_interp_transaction.
Armin Rigo
Add an argument to the callback invoked by stm_perform_transaction: a retry counter starting at 0.
Armin Rigo
Adding a libitm wrapper. Not used so far, and crashes anyway because libitm doesn't expect _ITM_RU?() calls when not in a transaction at all.
Armin Rigo
Propagate the exception that occurs in a transaction.
Armin Rigo
Add two __builtin_expect() to optimize the order of the assembler, maybe.
Armin Rigo
(bivab, romain, arigo) Found out that a "volatile struct { int x; }" is not the same thing as a "struct { volatile int x; }". In fact the "volatile" in the first example seems to have no effect. Bah. Fixed by removing the struct completely, as nowadays it contains only one field.
Armin Rigo
Clean up the implementation of the reads and writes of less than one word.
Armin Rigo
Kill parts of the code that are outdated.
Armin Rigo
add 5 operations that cause a pypy-stm to go into inevitable mode
Armin Rigo
Skip this import if it fails because of _weakref
Armin Rigo
Bah. Temporary workaround: can't use bool_t because casting to a bool_t has unexpected results for stm_*_partial_word()
Armin Rigo
Shut off spurious warnings.
Armin Rigo
Fix for --gc=none.
Armin Rigo
Re-enable cast_ptr_to_adr for now.
Armin Rigo
void fields.
Armin Rigo
Forgot to add two files.
Armin Rigo
(bivab, arigo) Translation fixes.
Armin Rigo
(bivab, arigo) - really create a low-level transaction for running each transaction - changed the addition of new transactions to go into a per-thread list until the transaction really commits - enable some more tests
Armin Rigo
(bivab, arigo) Fixed rlib.rstm to run correctly on top of CPython with multiple threads.
Armin Rigo
(bivab, arigo) A failing test.
Armin Rigo
(bivab, arigo) Wrote the app-level interface for 'transaction', with careful(?) messy locking.
Armin Rigo
(antocuni, arigo) Refactored targetdemo.py to use the new interface. Allow debug_start/debug_print/debug_stop to work (as long as you don't say PYPYLOG=..:file) by making the flag thread-local.
Armin Rigo
(antocuni, arigo) Test and fix: handle the case of stm_{get,set}field() called after descriptor_init() but outside a transaction.
Armin Rigo
(antocuni, arigo) A way to get and test the current transaction mode, for debugging.
Armin Rigo
(antocuni, arigo) Test (maybe) for inevitable transactions.
Armin Rigo
(antocuni, arigo) Add an integration test to test_rstm.py: really call rstm.perform_transaction() in a C-compiled test.
Armin Rigo
(antocuni, arigo) Move CompiledSTMTests to its own file in translator/stm/test/support.py.
Antonio Cuni
(arigo, antocuni): rename _rffi_stm.* to _rffi_stm.stm_* and rstm.stm_* to rstm.*
Antonio Cuni
(arigo, antocuni): start to write the RPython level interface for using transactions in rlib/rstm.py. Move the compiled tests from translator/stm/test_transform.py to rlib/test/test_rstm.py
Armin Rigo
hg merge
Antonio Cuni
(arigo, antocuni) fix test which failed after the renaming of stm_become_inevitable
Armin Rigo
hg merge default
Antonio Cuni
(arigo, antocuni): fix test_setinteriorfield_all_sizes, and make sure we test both the cases of stm_setinteriorfield inside and outside a transaction
Antonio Cuni
(arigo, antocuni): fix test_getinteriorfield_all_sizes, and make sure we test both the cases of stm_getinteriorfield inside and outside a transaction
Antonio Cuni
(arigo, antocuni): fix test_setarrayitem_all_sizes, and make sure we test both the cases of stm_setarrayitem inside and outside a transaction
Antonio Cuni
(arigo, antocuni): fix test_getarrayitem_all_sizes, and make sure we test both the cases of stm_getarrayitem inside and outside a transaction
Antonio Cuni
(arigo, antocuni): fix test_setfield_all_sizes, and make sure we test both the cases of stm_setfield inside and outside a transaction
Antonio Cuni
(arigo, antocuni): fix test_getfield_all_sizes, and make sure we test both the cases of stm_getfield inside and outside a transaction
Armin Rigo
(antocuni, arigo) Fix the llstminterp. Wondering a bit what is its purpose...
Armin Rigo
(antocuni, arigo) Start to refactor the world. The idea is not to build on RPython threads any more.
Armin Rigo
Revert 0782958b144f. No longer needed.
Armin Rigo
Add a (skipped) test about using the minimark GC.
Armin Rigo
hg merge default
Armin Rigo
Fix.
Armin Rigo
Fix the test.
Armin Rigo
update
Armin Rigo
Hard-code the STM logic here for now.
Armin Rigo
Use default=False, and enable it only in -O2/O3/Ojit, like the other optimizations. Fixes an issue if weakrefs are disabled.
Armin Rigo
update
Armin Rigo
One more.
Armin Rigo
malloc_varsize.
Armin Rigo
update
Armin Rigo
Yay, test_ztranslation passes. The issue was direct memcpy on STRs, which don't work any more right now.
Armin Rigo
fix.
Armin Rigo
interiorfield operations.
Armin Rigo
Added a file in that branch too to memorize things to do.
Armin Rigo
Hack. It may stay around if no solution to the problem is found, but of course only if stm is enabled.
Armin Rigo
Extend the test.
Armin Rigo
More tests, fixes.
Armin Rigo
setarrayitem
Armin Rigo
getarrayitem in funcgen.py. Refactor test_funcgen to actually test something :-(
Armin Rigo
Start a test for the complicated logic in funcgen.py, even though it mirrors closely the (tested) logic in rstm.py.
Armin Rigo
getarrayitem. Disabled for now because it's missing the C impl.
Armin Rigo
setarrayitem.
Armin Rigo
Yay! targetdemo is fixed and seems to be working. Added a test for it.
Armin Rigo
Test and fix.
Armin Rigo
In-progress
Armin Rigo
A few extra operations that are always allowed.
Armin Rigo
hg merge default
Armin Rigo
hum.
Armin Rigo
Baaaaah. setjmp() cannot be called on a jmp_buf that belongs to a parent frame, because then longjmp()ing to it will not automatically recreate the subframe... Need to fix it by introducing macros instead of a function call.
Armin Rigo
Break a line that is definitely too long in the log.
Armin Rigo
kill these two C functions.
Armin Rigo
A poor man's lock: just use a regular counter and check it every second. As it's all protected by STM it works nicely.
Armin Rigo
Yay, the first example of RPython program that runs successfully on multiple threads.
Armin Rigo
Tweaks.
Armin Rigo
Improve targetdemo.
Armin Rigo
- various small improvements - distinguish gc- from raw-{get,set}fields - start making targetdemo really multithreaded
Armin Rigo
Protect debug printing with the RPY_STM_ASSERT define. Lets us run tests.
Armin Rigo
Progress.
Armin Rigo
Kill the explicit C code manipulating GC strings and lists at start-up, and replace it with RPython code. (transplanted from c682e7a8ccce6595773aaaafc28eeafab75eee51)
Armin Rigo
Move and add comments.
Armin Rigo
- mallocs of GC objects is supported by the STM system (for now with Boehm) - fix: don't store ophandler on self.__class__, because it is typically a method bound to the current self
Armin Rigo
Test that the stm mode falls back to "inevitable_transaction" when we see an unsupported operation like raw_malloc.
Armin Rigo
bug fix
Armin Rigo
Add the missing operations.
Armin Rigo
Random progress.
Armin Rigo
Progress.
Armin Rigo
begin_inevitable_transaction.
Armin Rigo
Progress
Armin Rigo
'transaction_boundary' is better for the transformer.
Armin Rigo
Fixes.
Armin Rigo
Transform and compile to C code: first early version.
Armin Rigo
transform.py should not touch immutable getfields
Armin Rigo
Simplify.
Armin Rigo
- Refactor to support getfield of immutables. That's enough to raise simple exceptions. - Complain when an exception leaves the frame in which we did begin_transaction().
Armin Rigo
We cannot return out of the frame that started a regular transaction.
Armin Rigo
A graph transformer, so far just renaming '{get,set}field' into 'stm_{get,set}field'.
Armin Rigo
Keep track of the stm mode in which the LLSTMFrame is. Only allow operations that make sense in the current mode.
Armin Rigo
A subclass of llinterp that detects non-STM-friendly instructions.
Armin Rigo
hg merge default
Armin Rigo
Extra checks.
Armin Rigo
Single floats.
Armin Rigo
Support for 'double'.
Armin Rigo
long long support.
Armin Rigo
Allow (and ignore) nested descriptor_init()s.
Armin Rigo
Fix the test.
Armin Rigo
Improve comment.
Armin Rigo
hg merge default
Armin Rigo
stm_setfield.
Armin Rigo
Support fields of various types, including smaller arithmetic types.
Armin Rigo
stm_setfield in genc.
Armin Rigo
stm_getfield in genc.
Armin Rigo
The compiled tests work out of the box, but I would be happy to work a bit more and avoid that a single stm_getfield() gets turned into a list of operations.
Armin Rigo
stm_setfield.
Armin Rigo
Start the rstm module.
Armin Rigo
Progress.
Armin Rigo
Aborting works, even in fully untranslated py.tests.
Armin Rigo
Import from arigo/hack/stm/c.
Armin Rigo
Make the exc_data structure a thread-local.
Armin Rigo
A branch of PyPy to start playing with STM. See also my hacks repository, more precisely this dir: https://bitbucket.org/arigo/arigo/raw/default/hack/stm/pypy