[pypy-commit] stmgc default: add an assert for the stm_write_card fastpath

Raemi noreply at buildbot.pypy.org
Wed Apr 1 11:13:17 CEST 2015


Author: Remi Meier <remi.meier at inf.ethz.ch>
Branch: 
Changeset: r1744:575d288a77d3
Date: 2015-04-01 10:26 +0200
http://bitbucket.org/pypy/stmgc/changeset/575d288a77d3/

Log:	add an assert for the stm_write_card fastpath

diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -106,7 +106,6 @@
             /* case "small enough" */
             nobj = (object_t *)allocate_outside_nursery_small(size);
         }
-
         //dprintf(("move %p -> %p\n", obj, nobj));
 
         /* copy the object */
@@ -143,6 +142,9 @@
     /* Must trace the object later */
     LIST_APPEND(STM_PSEGMENT->objects_pointing_to_nursery, nobj_sync_now);
     _cards_cleared_in_object(get_priv_segment(STM_SEGMENT->segment_num), nobj, true);
+
+    assert(IMPLY(obj_should_use_cards(STM_SEGMENT->segment_base, nobj),
+                 (((uintptr_t)nobj) & 15) == 0));
 }
 
 static void _cards_cleared_in_object(struct stm_priv_segment_info_s *pseg, object_t *obj,


More information about the pypy-commit mailing list