X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=rts%2FGCCompact.c;h=45222c3b9bfe64e207ce0d5c5c9df28585b79eb5;hp=682a09a303b336fd6fdbedff3c0cda0f0ae8d589;hb=5a2769f0273dd389977e8283375e7920d183bdd4;hpb=3f10646cfe2c3409056a49d1ef1c4507af522573 diff --git a/rts/GCCompact.c b/rts/GCCompact.c index 682a09a..45222c3 100644 --- a/rts/GCCompact.c +++ b/rts/GCCompact.c @@ -17,6 +17,7 @@ #include "GCCompact.h" #include "Schedule.h" #include "Apply.h" +#include "Trace.h" // Turn off inlining when debugging - it obfuscates things #ifdef DEBUG @@ -931,12 +932,14 @@ compact( void (*get_roots)(evac_fn) ) for (s = 0; s < generations[g].n_steps; s++) { if (g==0 && s ==0) continue; stp = &generations[g].steps[s]; - IF_DEBUG(gc, debugBelch("update_fwd: %d.%d\n", stp->gen->no, stp->no);); + debugTrace(DEBUG_gc, "update_fwd: %d.%d", + stp->gen->no, stp->no); update_fwd(stp->blocks); update_fwd_large(stp->scavenged_large_objects); if (g == RtsFlags.GcFlags.generations-1 && stp->old_blocks != NULL) { - IF_DEBUG(gc, debugBelch("update_fwd: %d.%d (compact)\n", stp->gen->no, stp->no);); + debugTrace(DEBUG_gc, "update_fwd: %d.%d (compact)", + stp->gen->no, stp->no); update_fwd_compact(stp->old_blocks); } } @@ -946,9 +949,10 @@ compact( void (*get_roots)(evac_fn) ) stp = &oldest_gen->steps[0]; if (stp->old_blocks != NULL) { blocks = update_bkwd_compact(stp); - IF_DEBUG(gc, debugBelch("update_bkwd: %d.%d (compact, old: %d blocks, now %d blocks)\n", - stp->gen->no, stp->no, - stp->n_old_blocks, blocks);); + debugTrace(DEBUG_gc, + "update_bkwd: %d.%d (compact, old: %d blocks, now %d blocks)", + stp->gen->no, stp->no, + stp->n_old_blocks, blocks); stp->n_old_blocks = blocks; } }