summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rts/Timer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/rts/Timer.c b/rts/Timer.c
index 99c09b03a3..bf7240b96a 100644
--- a/rts/Timer.c
+++ b/rts/Timer.c
@@ -72,10 +72,15 @@ handle_tick(int unused STG_UNUSED)
#endif
} else {
recent_activity = ACTIVITY_DONE_GC;
- // disable timer signals (see #1623, #5991)
- // but only if we're not profiling
+ // disable timer signals (see #1623, #5991, #9105)
+ // but only if we're not profiling (e.g. passed -h or -p RTS
+ // flags). If we are profiling we need to keep the timer active
+ // so that samples continue to be collected.
#ifndef PROFILING
- stopTimer();
+ if (!(RtsFlags.ProfFlags.doHeapProfile
+ || RtsFlags.CcFlags.doCostCentres)) {
+ stopTimer();
+ }
#endif
}
} else {