summaryrefslogtreecommitdiff
path: root/rts
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2011-05-11 11:00:10 +0100
committerSimon Marlow <marlowsd@gmail.com>2011-05-11 11:54:02 +0100
commit9fb9395beebc5c6f85571991af7fd55b4db86977 (patch)
tree3c4b672ad4b10c023f65a45df1ddbc53523af964 /rts
parenta50363e7956e80b4726e7b9b9ea447e4a4793d5f (diff)
downloadhaskell-9fb9395beebc5c6f85571991af7fd55b4db86977.tar.gz
scheduleDoGC: if we're doing heapCensus(), do it *before* releasing
the other mutator threads (#5127)
Diffstat (limited to 'rts')
-rw-r--r--rts/Schedule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/rts/Schedule.c b/rts/Schedule.c
index f5cb568600..9636223836 100644
--- a/rts/Schedule.c
+++ b/rts/Schedule.c
@@ -1447,6 +1447,12 @@ delete_threads_and_gc:
recent_activity = ACTIVITY_YES;
}
+ if (heap_census) {
+ debugTrace(DEBUG_sched, "performing heap census");
+ heapCensus();
+ performHeapProfile = rtsFalse;
+ }
+
#if defined(THREADED_RTS)
if (gc_type == PENDING_GC_PAR)
{
@@ -1454,12 +1460,6 @@ delete_threads_and_gc:
}
#endif
- if (heap_census) {
- debugTrace(DEBUG_sched, "performing heap census");
- heapCensus();
- performHeapProfile = rtsFalse;
- }
-
if (heap_overflow && sched_state < SCHED_INTERRUPTING) {
// GC set the heap_overflow flag, so we should proceed with
// an orderly shutdown now. Ultimately we want the main