Author: Armin Rigo <[email protected]>
Branch: concurrent-marksweep
Changeset: r47912:d999161e4c7a
Date: 2011-10-09 21:33 +0200
http://bitbucket.org/pypy/pypy/changeset/d999161e4c7a/
Log: Start to write debug info, very minimal for now
diff --git a/pypy/rpython/memory/gc/concurrentms.py
b/pypy/rpython/memory/gc/concurrentms.py
--- a/pypy/rpython/memory/gc/concurrentms.py
+++ b/pypy/rpython/memory/gc/concurrentms.py
@@ -5,7 +5,7 @@
from pypy.rpython.annlowlevel import llhelper
from pypy.translator.tool.cbuild import ExternalCompilationInfo
from pypy.rlib.objectmodel import we_are_translated, running_on_llinterp
-from pypy.rlib.debug import ll_assert, debug_print
+from pypy.rlib.debug import ll_assert, debug_print, debug_start, debug_stop
from pypy.rlib.rarithmetic import ovfcheck, LONG_BIT, r_uint
from pypy.rpython.memory.gc.base import GCBase
from pypy.module.thread import ll_thread
@@ -448,6 +448,8 @@
"""In the mutator thread: wait for the collection currently
running (if any) to finish."""
if self.collection_running != 0:
+ debug_start("gc-stop")
+ #
self.acquire(self.finished_lock)
self.collection_running = 0
#
@@ -476,6 +478,8 @@
#
if self.DEBUG:
self.debug_check_lists()
+ #
+ debug_stop("gc-stop")
def collect(self, gen=2):
@@ -502,6 +506,8 @@
# In case the previous collection is not over yet, wait for it
self.wait_for_the_end_of_collection()
#
+ debug_start("gc-start")
+ #
# Scan the stack roots and the refs in non-GC objects
self.root_walker.walk_roots(
MostlyConcurrentMarkSweepGC._add_stack_root, # stack roots
@@ -528,6 +534,8 @@
# Start the collector thread
self.collection_running = 1
self.release(self.ready_to_start_lock)
+ #
+ debug_stop("gc-start")
def _add_stack_root(self, root):
obj = root.address[0]
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit