[pypy-commit] pypy stmgc-c8: import stmgc

Raemi noreply at buildbot.pypy.org
Mon Nov 23 08:36:46 EST 2015


Author: Remi Meier <remi.meier at gmail.com>
Branch: stmgc-c8
Changeset: r80856:30d48688fee4
Date: 2015-11-23 14:38 +0100
http://bitbucket.org/pypy/pypy/changeset/30d48688fee4/

Log:	import stmgc

	(~20% reduction in 'sys' time observed, 1.2s -> 1.0s)

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 @@
-e3071642fd5c
+d31c9f671775
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
@@ -925,8 +925,7 @@
 
 static void touch_all_pages_of_obj(object_t *obj, size_t obj_size)
 {
-    /* XXX should it be simpler, just really trying to read a dummy
-       byte in each page? */
+    /* XXX: make this function not needed */
     int my_segnum = STM_SEGMENT->segment_num;
     uintptr_t end_page, first_page = ((uintptr_t)obj) / 4096UL;
 
@@ -942,8 +941,8 @@
     for (page = first_page; page <= end_page; page++) {
         if (get_page_status_in(my_segnum, page) == PAGE_NO_ACCESS) {
             release_privatization_lock(STM_SEGMENT->segment_num);
-            volatile char *dummy = REAL_ADDRESS(STM_SEGMENT->segment_base, page * 4096UL);
-            *dummy;            /* force segfault */
+            /* emulate pagefault -> PAGE_ACCESSIBLE: */
+            handle_segfault_in_page(page);
             acquire_privatization_lock(STM_SEGMENT->segment_num);
         }
     }


More information about the pypy-commit mailing list