Author: Armin Rigo <ar...@tunes.org>
Branch: 
Changeset: r48213:5fcf5ac416dc
Date: 2011-10-18 20:03 +0200
http://bitbucket.org/pypy/pypy/changeset/5fcf5ac416dc/

Log:    Give the walk_roots operation during a nursery collection its own
        starting/ending subtime. When running "translate.py --annotate", it
        is found to take 15% of the time of nursery collections (not really
        enough to care). For reference, the times are:

         12.4% gc-minor including 1.9% gc-minor-walkroots 6.5%
        gc-collect (i.e. major collections)

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
@@ -1292,10 +1292,12 @@
         # if a prebuilt GcStruct contains a pointer to a young object,
         # then the write_barrier must have ensured that the prebuilt
         # GcStruct is in the list self.old_objects_pointing_to_young.
+        debug_start("gc-minor-walkroots")
         self.root_walker.walk_roots(
             MiniMarkGC._trace_drag_out1,  # stack roots
             MiniMarkGC._trace_drag_out1,  # static in prebuilt non-gc
             None)                         # static in prebuilt gc
+        debug_stop("gc-minor-walkroots")
 
     def collect_cardrefs_to_nursery(self):
         size_gc_header = self.gcheaderbuilder.size_gc_header
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to