Author: Armin Rigo <[email protected]>
Branch: 
Changeset: r67423:b08218207ffd
Date: 2013-10-16 15:44 +0200
http://bitbucket.org/pypy/pypy/changeset/b08218207ffd/

Log:    Move the three new lines outside the performance-critical
        _trace_drag_out().

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
@@ -1580,6 +1580,14 @@
 
 
     def _trace_drag_out1(self, root):
+        # In the MARKING state, we must also record this old object,
+        # if it is not VISITED yet.
+        if self.gc_state == STATE_MARKING:
+            obj = root.address[0]
+            if not self.is_in_nursery(obj):
+                if not self.header(obj).tid & GCFLAG_VISITED:
+                    self.objects_to_trace.append(obj)
+        #
         self._trace_drag_out(root, None)
 
     def _trace_drag_out(self, root, ignored):
@@ -1597,9 +1605,6 @@
             if (bool(self.young_rawmalloced_objects)
                 and self.young_rawmalloced_objects.contains(obj)):
                 self._visit_young_rawmalloced_object(obj)
-            if self.gc_state == STATE_MARKING:
-                if not self.header(obj).tid & GCFLAG_VISITED:
-                    self.objects_to_trace.append(obj)
             return
         #
         size_gc_header = self.gcheaderbuilder.size_gc_header
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to