Author: Armin Rigo <[email protected]>
Branch: stmgc-c7
Changeset: r71327:fa594293079d
Date: 2014-05-06 12:28 +0200
http://bitbucket.org/pypy/pypy/changeset/fa594293079d/
Log: merge heads
diff --git a/rpython/translator/stm/src_stm/revision
b/rpython/translator/stm/src_stm/revision
--- a/rpython/translator/stm/src_stm/revision
+++ b/rpython/translator/stm/src_stm/revision
@@ -1,1 +1,1 @@
-822e52f17647
+84f5fbe03d5d
diff --git a/rpython/translator/stm/src_stm/stm/nursery.c
b/rpython/translator/stm/src_stm/stm/nursery.c
--- a/rpython/translator/stm/src_stm/stm/nursery.c
+++ b/rpython/translator/stm/src_stm/stm/nursery.c
@@ -306,6 +306,12 @@
STM_PSEGMENT->minor_collect_will_commit_now = commit;
if (!commit) {
+ /* We should commit soon, probably. This is kind of a
+ workaround for the broken stm_should_break_transaction of
+ pypy that doesn't want to commit any more after a minor
+ collection. It may, however, always be a good idea... */
+ stmcb_commit_soon();
+
/* 'STM_PSEGMENT->overflow_number' is used now by this collection,
in the sense that it's copied to the overflow objects */
STM_PSEGMENT->overflow_number_has_been_used = true;
diff --git a/rpython/translator/stm/src_stm/stmgcintf.c
b/rpython/translator/stm/src_stm/stmgcintf.c
--- a/rpython/translator/stm/src_stm/stmgcintf.c
+++ b/rpython/translator/stm/src_stm/stmgcintf.c
@@ -23,6 +23,16 @@
pypy_stmcb_trace(obj, (void(*)(void*))visit);
}
+inline void stmcb_commit_soon()
+{
+ if (pypy_stm_nursery_low_fill_mark == (uintptr_t)-1) {
+ /* atomic */
+ pypy_stm_nursery_low_fill_mark_saved = 0;
+ } else {
+ pypy_stm_nursery_low_fill_mark >>= 2;
+ }
+}
+
/************************************************************/
/* "include" the stmgc.c file here */
@@ -147,7 +157,7 @@
transaction.
*/
assert(pypy_stm_nursery_low_fill_mark != (uintptr_t) -1);
- assert((STM_SEGMENT->jmpbuf_ptr == NULL) ==
+ assert(!(STM_SEGMENT->jmpbuf_ptr == NULL) ||
(pypy_stm_nursery_low_fill_mark == 0));
stm_commit_transaction();
@@ -182,7 +192,7 @@
transaction whose jmpbuf points into this function
*/
if (pypy_stm_ready_atomic == 1) {
- assert(pypy_stm_nursery_low_fill_mark != 0);
+ //assert(pypy_stm_nursery_low_fill_mark != 0);
assert(pypy_stm_nursery_low_fill_mark != (uintptr_t) -1);
stm_commit_transaction();
pypy_stm_nursery_low_fill_mark = 0;
@@ -196,7 +206,7 @@
}
/* double-check */
if (pypy_stm_ready_atomic == 1) {
- assert((STM_SEGMENT->jmpbuf_ptr == NULL) ==
+ assert(!(STM_SEGMENT->jmpbuf_ptr == NULL) ||
(pypy_stm_nursery_low_fill_mark == 0));
}
else {
@@ -234,5 +244,3 @@
_pypy_stm_inev_state();
stm_become_globally_unique_transaction(&stm_thread_local, "for the JIT");
}
-
-void stmcb_commit_soon(void) { /*XXX FIXME*/ }
diff --git a/rpython/translator/stm/src_stm/stmgcintf.h
b/rpython/translator/stm/src_stm/stmgcintf.h
--- a/rpython/translator/stm/src_stm/stmgcintf.h
+++ b/rpython/translator/stm/src_stm/stmgcintf.h
@@ -73,7 +73,7 @@
case 1:
pypy_stm_nursery_low_fill_mark = pypy_stm_nursery_low_fill_mark_saved;
assert(pypy_stm_nursery_low_fill_mark != (uintptr_t) -1);
- assert((STM_SEGMENT->jmpbuf_ptr == NULL) ==
+ assert(!(STM_SEGMENT->jmpbuf_ptr == NULL) ||
(pypy_stm_nursery_low_fill_mark == 0));
break;
case 0:
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit