Commit 9dfd529c authored by Ben Gamari's avatar Ben Gamari 🐢

Weak Tracing

parent 4d570d2d
......@@ -3080,7 +3080,7 @@ resurrectThreads (StgTSO *threads)
for (tso = threads; tso != END_TSO_QUEUE; tso = next) {
next = tso->global_link;
debugBelch("resurrect %p\n", tso);
debugTrace(DEBUG_weak, "resurrect %p\n", tso);
gen = Bdescr((P_)tso)->gen;
tso->global_link = gen->threads;
......
......@@ -205,7 +205,7 @@ static bool resurrectUnreachableThreads (generation *gen, StgTSO **resurrected_t
for (t = gen->old_threads; t != END_TSO_QUEUE; t = next) {
next = t->global_link;
debugBelch("resurrectUnreachableThreads %p, gen=%d\n", t, gen->no);
debugTrace(DEBUG_weak, "resurrectUnreachableThreads %p, gen=%d\n", t, gen->no);
// ThreadFinished and ThreadComplete: we have to keep
// these on the all_threads list until they
......@@ -332,7 +332,7 @@ static void tidyThreadList (generation *gen)
t = tmp;
}
debugBelch("tidyThreadList(gen=%d): %p => %p\n", gen->no, t, tmp);
debugTrace(DEBUG_weak, "tidyThreadList(gen=%d): %p => %p\n", gen->no, t, tmp);
ASSERT(get_itbl((StgClosure *)t)->type == TSO);
next = t->global_link;
......
......@@ -861,7 +861,7 @@ void nonmovingCollect(StgWeak **dead_weaks, StgTSO **resurrected_threads)
// Mark threads resurrected during moving heap scavenging
for (StgTSO *tso = *resurrected_threads; tso != END_TSO_QUEUE; tso = tso->global_link) {
debugBelch("resurrecting from moving %p\n", tso);
debugTrace(DEBUG_weak, "resurrecting from moving %p\n", tso);
markQueuePushClosure_(mark_queue, (StgClosure*)tso);
}
trace(TRACE_nonmoving_gc, "Finished marking roots for nonmoving GC");
......
......@@ -1661,7 +1661,7 @@ mark_closure (MarkQueue *queue, const StgClosure *p0, StgClosure **origin)
}
case TSO:
debugBelch("Marked TSO %p\n", p);
debugTrace(DEBUG_weak, "Marked TSO %p\n", p);
mark_tso(queue, (StgTSO *) p);
break;
......@@ -2012,7 +2012,7 @@ void nonmovingTidyThreads ()
next = t->global_link;
debugBelch("nonmovingTidyThreads: %p => %s\n",
debugTrace(DEBUG_weak, "nonmovingTidyThreads: %p => %s\n",
t, nonmovingIsNowAlive((StgClosure*) t) ? "live" : "dead");
// N.B. This thread is in old_threads, consequently we *know* it is in
......@@ -2037,7 +2037,7 @@ void nonmovingResurrectThreads (struct MarkQueue_ *queue, StgTSO **resurrected_t
StgTSO *next;
for (StgTSO *t = nonmoving_old_threads; t != END_TSO_QUEUE; t = next) {
next = t->global_link;
debugBelch("nonmoving resurrect %p\n", t);
debugTrace(DEBUG_weak, "nonmoving resurrect %p\n", t);
switch (t->what_next) {
case ThreadKilled:
......
......@@ -10,6 +10,7 @@
#include "Printer.h"
#include "TraceDump.h"
#include "MarkWeak.h" // scavengeLiveWeak
#include "Trace.h"
void
nonmovingScavengeOne (StgClosure *q)
......@@ -134,7 +135,7 @@ nonmovingScavengeOne (StgClosure *q)
// moving heap which may be long gone by the time we call
// nonmovingTidyWeaks.
StgWeak *weak = (StgWeak *) p;
debugBelch("nonmovingScav: evac key %p (gen=%d) of weak %p\n",
debugTrace(DEBUG_weak, "nonmovingScav: evac key %p (gen=%d) of weak %p\n",
weak->key, Bdescr(weak->key)->gen_no, weak);
//gct->eager_promotion = true;
//evacuate(&weak->key);
......
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