summaryrefslogtreecommitdiff
path: root/rts/sm
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-07-24 00:01:54 +0100
committerIan Lynagh <igloo@earth.li>2011-07-24 00:01:54 +0100
commit4f8cfaf97168e5f81925f9254dabcea38603c48f (patch)
tree61c938fbe348f6c5327aba868aebd879c6efcfd0 /rts/sm
parent2b42de78c59d81300aa62b17cf2b5d984fa55e84 (diff)
downloadhaskell-4f8cfaf97168e5f81925f9254dabcea38603c48f.tar.gz
Fix heap profiling times
Now that the heap census runs in the middle of garbage collections, the "CPU time" it was calculating included any CPU time used so far in the current GC. This could cause CPU time to appear to go down, which means hp2ps complained about "samples out of sequence". I'm not sure if this is the nicest way to solve this (maybe resurrecting mut_user_time_during_GC would be better?) but it gets things working again.
Diffstat (limited to 'rts/sm')
-rw-r--r--rts/sm/GC.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/sm/GC.c b/rts/sm/GC.c
index 2b9ee9d234..2252cfcd63 100644
--- a/rts/sm/GC.c
+++ b/rts/sm/GC.c
@@ -669,7 +669,7 @@ GarbageCollect (rtsBool force_major_gc,
if (do_heap_census) {
debugTrace(DEBUG_sched, "performing heap census");
RELEASE_SM_LOCK;
- heapCensus();
+ heapCensus(gct->gc_start_cpu);
ACQUIRE_SM_LOCK;
}