X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FGC.c;h=5097483dac79d2cd996efa9cbd1a1a9508738c25;hb=abc6d6fab6ff9ebbdee9424d5ba7f1c37c41bac8;hp=07cf2b51e5f3fa92b51f74bff1a170fb79b2a41d;hpb=754e039a8a15d5774fe73872ff9ac593b46370e0;p=ghc-hetmet.git diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 07cf2b5..5097483 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -1020,9 +1020,10 @@ scavenge_until_all_done (void) { nat r; - debugTrace(DEBUG_gc, "GC thread %d working", gct->thread_index); loop: + traceEvent(&capabilities[gct->thread_index], EVENT_GC_WORK); + #if defined(THREADED_RTS) if (n_gc_threads > 1) { scavenge_loop(); @@ -1036,8 +1037,9 @@ loop: // scavenge_loop() only exits when there's no work to do r = dec_running(); - debugTrace(DEBUG_gc, "GC thread %d idle (%d still running)", - gct->thread_index, r); + traceEvent(&capabilities[gct->thread_index], EVENT_GC_IDLE); + + debugTrace(DEBUG_gc, "%d GC threads still running", r); while (gc_running_threads != 0) { // usleep(1); @@ -1051,8 +1053,7 @@ loop: // scavenge_loop() to perform any pending work. } - // All threads are now stopped - debugTrace(DEBUG_gc, "GC thread %d finished.", gct->thread_index); + traceEvent(&capabilities[gct->thread_index], EVENT_GC_DONE); } #if defined(THREADED_RTS)