[pypy-commit] pypy gc-incminimark-pinning: initial fix for 'test_old_objects_pointing_to_pinned_not_exploading'
groggi
noreply at buildbot.pypy.org
Thu Aug 14 19:05:21 CEST 2014
Author: Gregor Wegberg <code at gregorwegberg.com>
Branch: gc-incminimark-pinning
Changeset: r72809:df44232936bf
Date: 2014-08-14 16:42 +0200
http://bitbucket.org/pypy/pypy/changeset/df44232936bf/
Log: initial fix for 'test_old_objects_pointing_to_pinned_not_exploading'
diff --git a/rpython/memory/gc/incminimark.py b/rpython/memory/gc/incminimark.py
--- a/rpython/memory/gc/incminimark.py
+++ b/rpython/memory/gc/incminimark.py
@@ -1676,6 +1676,9 @@
self.nursery_free = self.nursery
self.nursery_top = self.nursery_barriers.popleft()
+ self.old_objects_pointing_to_pinned.foreach(
+ self._reset_flag_old_objects_pointing_to_pinned, None)
+
debug_print("minor collect, total memory used:",
self.get_total_memory_used())
debug_print("number of pinned objects:",
@@ -1687,6 +1690,10 @@
#
debug_stop("gc-minor")
+ def _reset_flag_old_objects_pointing_to_pinned(self, obj, ignore):
+ assert self.header(obj).tid & GCFLAG_PINNED
+ self.header(obj).tid &= ~GCFLAG_PINNED
+
def _visit_old_objects_pointing_to_pinned(self, obj, ignore):
self.trace(obj, self._trace_drag_out, obj)
@@ -1863,8 +1870,11 @@
elif self._is_pinned(obj):
hdr = self.header(obj)
# track parent of pinned object specially
- if parent != llmemory.NULL:
+ if parent != llmemory.NULL and \
+ not self.header(parent).tid & GCFLAG_PINNED:
+ #
self.old_objects_pointing_to_pinned.append(parent)
+ self.header(parent).tid |= GCFLAG_PINNED
if hdr.tid & GCFLAG_VISITED:
# already visited and keeping track of the object
More information about the pypy-commit
mailing list