[pypy-commit] stmgc default: Progress
arigo
noreply at buildbot.pypy.org
Tue May 28 19:08:11 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r47:0dfc3a9bc0a7
Date: 2013-05-27 21:38 +0200
http://bitbucket.org/pypy/stmgc/changeset/0dfc3a9bc0a7/
Log: Progress
diff --git a/c3/doc.txt b/c3/doc.txt
--- a/c3/doc.txt
+++ b/c3/doc.txt
@@ -53,3 +53,6 @@
- how to handle immutable objects? they might only be initialized after
they are moved; check
+
+- commit should not increase the global_cur_time if it only changed
+ protected objects
diff --git a/c3/et.c b/c3/et.c
--- a/c3/et.c
+++ b/c3/et.c
@@ -357,6 +357,8 @@
if (W->h_tid & GCFLAG_WRITE_BARRIER)
stmgc_write_barrier(W);
+ fprintf(stderr, "write_barrier: %p -> %p\n", P, W);
+
return W;
}
@@ -382,7 +384,10 @@
v = ACCESS_ONCE(R->h_revision);
if (!(v & 1)) // "is a pointer", i.e.
{ // "has a more recent revision"
- /* ... unless it is a GCFLAG_STOLEN object */
+ /* ... unless it's a protected-to-private link */
+ if (((gcptr)v)->h_revision == stm_local_revision)
+ continue;
+ /* ... or unless it is a GCFLAG_STOLEN object */
if (R->h_tid & GCFLAG_STOLEN)
{
assert(is_young(R));
diff --git a/c3/gcpage.c b/c3/gcpage.c
--- a/c3/gcpage.c
+++ b/c3/gcpage.c
@@ -273,7 +273,7 @@
if (obj->h_tid & GCFLAG_VISITED)
return; /* already seen */
- if (obj->h_tid & GCFLAG_PUBLIC_TO_PRIVATE) {
+ if (obj->h_tid & (GCFLAG_PUBLIC_TO_PRIVATE | GCFLAG_STUB)) {
if (obj->h_revision & 1) { // "is not a ptr", so no more recent version
obj->h_tid &= ~GCFLAG_PUBLIC_TO_PRIVATE; // see also fix_outdated()
}
diff --git a/c3/test/support.py b/c3/test/support.py
--- a/c3/test/support.py
+++ b/c3/test/support.py
@@ -136,6 +136,7 @@
void rawsetptr(gcptr obj, long index, gcptr newvalue)
{
+ fprintf(stderr, "%p->[%ld] = %p\n", obj, index, newvalue);
assert(stm_dbgmem_is_active(obj, 1));
assert(gettid(obj) > 421 + index);
((gcptr *)(obj + 1))[index] = newvalue;
diff --git a/c3/test/test_random.py b/c3/test/test_random.py
--- a/c3/test/test_random.py
+++ b/c3/test/test_random.py
@@ -220,7 +220,8 @@
is_too_recent = False
except model.Deleted:
is_too_recent = True
- assert is_too_recent == (result < 0)
+ if result < 0:
+ assert is_too_recent
if is_too_recent:
continue # can't really check more in this case
More information about the pypy-commit
mailing list