Author: Remi Meier <[email protected]>
Branch: stmgc-c8-gcc
Changeset: r79647:808c350438ad
Date: 2015-09-15 14:48 +0200
http://bitbucket.org/pypy/pypy/changeset/808c350438ad/
Log: import stmgc
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 @@
-8cba33de2246+
+7d754bc0f3a7
diff --git a/rpython/translator/stm/src_stm/stm/core.c
b/rpython/translator/stm/src_stm/stm/core.c
--- a/rpython/translator/stm/src_stm/stm/core.c
+++ b/rpython/translator/stm/src_stm/stm/core.c
@@ -1212,8 +1212,6 @@
in abort_data_structures_from_segment_num() */
STM_SEGMENT->nursery_mark = ((stm_char *)_stm_nursery_start +
stm_fill_mark_nursery_bytes);
- } else if (repeat_count >= 5) {
- _stm_become_inevitable("too many retries");
}
return repeat_count;
}
diff --git a/rpython/translator/stm/src_stm/stm/hashtable.c
b/rpython/translator/stm/src_stm/stm/hashtable.c
--- a/rpython/translator/stm/src_stm/stm/hashtable.c
+++ b/rpython/translator/stm/src_stm/stm/hashtable.c
@@ -180,6 +180,8 @@
char *to_read_from = segment_base;
if (segnum != -1) {
/* -> compaction during major GC */
+ /* it's possible that we just created this entry, and it wasn't
+ touched in this segment yet. Then seg0 is up-to-date. */
to_read_from = get_page_status_in(segnum, (uintptr_t)entry /
4096UL) == PAGE_NO_ACCESS
? stm_object_pages : to_read_from;
if (((struct stm_hashtable_entry_s *)
@@ -359,7 +361,7 @@
uintptr_t key)
{
stm_hashtable_entry_t *e = stm_hashtable_lookup(hobj, hashtable, key);
- stm_read((object_t *)e);
+ // stm_read((object_t *)e); - done in _lookup()
return e->object;
}
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
@@ -778,8 +778,16 @@
char *realobj = REAL_ADDRESS(STM_SEGMENT->segment_base, obj);
size_t size = stmcb_size_rounded_up((struct object_s *)realobj);
- /* always gets outside as a large object for now (XXX?) */
- object_t *nobj = (object_t *)allocate_outside_nursery_large(size);
+ /* always gets outside */
+ object_t *nobj;
+ if (size > GC_LAST_SMALL_SIZE) {
+ /* case 1: object is not small enough.
+ Ask gcpage.c for an allocation via largemalloc. */
+ nobj = (object_t *)allocate_outside_nursery_large(size);
+ } else {
+ /* case "small enough" */
+ nobj = (object_t *)allocate_outside_nursery_small(size);
+ }
/* Initialize the shadow enough to be considered a valid gc object.
If the original object stays alive at the next minor collection,
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit