Commit 91109404 authored by Ben Gamari's avatar Ben Gamari 🐢

nonmoving: Trace GC preparation steps

parent 7c35d39b
......@@ -819,6 +819,7 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
}
#endif
trace(TRACE_nonmoving_gc, "Starting nonmoving GC preparation");
resizeGenerations();
nonmovingPrepareMark();
......@@ -834,6 +835,7 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
current_mark_queue = mark_queue;
// Mark roots
trace(TRACE_nonmoving_gc, "Marking roots for nonmoving GC");
markCAFs((evac_fn)markQueueAddRoot, mark_queue);
for (unsigned int n = 0; n < n_capabilities; ++n) {
markCapability((evac_fn)markQueueAddRoot, mark_queue,
......@@ -847,6 +849,7 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
for (StgTSO *tso = *resurrected_threads; tso != END_TSO_QUEUE; tso = tso->global_link) {
markQueuePushClosure_(mark_queue, (StgClosure*)tso);
}
trace(TRACE_nonmoving_gc, "Finished marking roots for nonmoving GC");
// Roots marked, mark threads and weak pointers
......@@ -869,6 +872,7 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
ASSERT(nonmoving_old_weak_ptr_list == NULL);
nonmoving_old_weak_ptr_list = oldest_gen->weak_ptr_list;
oldest_gen->weak_ptr_list = NULL;
trace(TRACE_nonmoving_gc, "Finished nonmoving GC preparation");
// We are now safe to start concurrent marking
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment