[pypy-commit] pypy gc-minimark-pinning: count the number of pinnedo bjects in the nursery

fijal noreply at buildbot.pypy.org
Fri Apr 20 19:19:50 CEST 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: gc-minimark-pinning
Changeset: r54592:b949f7afc02a
Date: 2012-04-20 18:19 +0200
http://bitbucket.org/pypy/pypy/changeset/b949f7afc02a/

Log:	count the number of pinnedo bjects in the nursery

diff --git a/pypy/rpython/memory/gc/minimark.py b/pypy/rpython/memory/gc/minimark.py
--- a/pypy/rpython/memory/gc/minimark.py
+++ b/pypy/rpython/memory/gc/minimark.py
@@ -1334,6 +1334,7 @@
         self.surviving_pinned_objects.sort()
         while self.surviving_pinned_objects.non_empty():
             next = self.surviving_pinned_objects.pop()
+            self.pinned_objects_in_nursery += 1
             assert next >= prev
             size = llarena.getfakearenaaddress(next) - prev
             llarena.arena_reset(prev, size, 2)
@@ -1360,6 +1361,8 @@
         #
         debug_print("minor collect, total memory used:",
                     self.get_total_memory_used())
+        debug_print("number of pinned objects:",
+                    self.pinned_objects_in_nursery)
         if self.DEBUG >= 2:
             self.debug_check_consistency()     # expensive!
         debug_stop("gc-minor")


More information about the pypy-commit mailing list