[pypy-svn] r68758 - pypy/branch/gc-dump-heap/pypy/rpython/memory/gc

fijal at codespeak.net fijal at codespeak.net
Mon Oct 26 16:34:47 CET 2009


Author: fijal
Date: Mon Oct 26 16:34:47 2009
New Revision: 68758

Modified:
   pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/base.py
   pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/semispace.py
Log:
Store also the size of an object and kill a debug print


Modified: pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/base.py
==============================================================================
--- pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/base.py	(original)
+++ pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/base.py	Mon Oct 26 16:34:47 2009
@@ -7,7 +7,8 @@
 from pypy.rpython.lltypesystem.llmemory import NULL, raw_malloc_usage
 
 TYPEID_MAP = lltype.GcStruct('TYPEID_MAP', ('count', lltype.Signed),
-                           ('links', lltype.Array(lltype.Signed)))
+                             ('size', lltype.Signed),
+                             ('links', lltype.Array(lltype.Signed)))
 ARRAY_TYPEID_MAP = lltype.GcArray(lltype.Ptr(TYPEID_MAP))
 
 class GCBase(object):

Modified: pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/semispace.py
==============================================================================
--- pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/semispace.py	(original)
+++ pypy/branch/gc-dump-heap/pypy/rpython/memory/gc/semispace.py	Mon Oct 26 16:34:47 2009
@@ -648,10 +648,10 @@
     def track_heap(self, adr):
         if self._tracked_dict.contains(adr):
             return
-        llop.debug_print(lltype.Void, adr)
         self._tracked_dict.add(adr)
         idx = llop.get_member_index(lltype.Signed, self.get_type_id(adr))
         self._ll_typeid_map[idx].count += 1
+        self._ll_typeid_map[idx].size = self.get_size(adr)
         self.trace(adr, self.track_heap_parent, adr)
 
     def _track_heap_root(self, root):



More information about the Pypy-commit mailing list