RTS tidyup sweep, first phase
[ghc-hetmet.git] / rts / sm / Sweep.c
index 979fe9c..b657402 100644 (file)
  *
  * ---------------------------------------------------------------------------*/
 
+#include "PosixSource.h"
 #include "Rts.h"
+
+#include "Storage.h"
 #include "Sweep.h"
-#include "Block.h"
 #include "Trace.h"
 
 void
@@ -70,13 +72,13 @@ sweep(step *step)
 
     step->live_estimate = live;
 
-    trace(DEBUG_gc|TRACE_gc, "sweeping: %d blocks, %d were copied, %d freed (%d%%), %d are fragmented, live estimate: %d%%",
+    debugTrace(DEBUG_gc, "sweeping: %d blocks, %d were copied, %d freed (%d%%), %d are fragmented, live estimate: %ld%%",
           step->n_old_blocks + freed,
           step->n_old_blocks - blocks + freed,
           freed,
           blocks == 0 ? 0 : (freed * 100) / blocks,
           fragd, 
-          (blocks - freed) == 0 ? 0 : ((live / BLOCK_SIZE_W) * 100) / (blocks - freed));
+          (unsigned long)((blocks - freed) == 0 ? 0 : ((live / BLOCK_SIZE_W) * 100) / (blocks - freed)));
 
     ASSERT(countBlocks(step->old_blocks) == step->n_old_blocks);
 }