Commit 1c6130d9 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari
Browse files

rts/Timer: Actually fix #9105

jberthold astutely pointed out that the previous fix (D1822) could not
have possibly fixed the issue as the patch would only have had any
effect if !PROFILING.

Test Plan: Check for reduced CPU usage when compiled with `-prof` but
without `+RTS -p`

Reviewers: simonmar, austin, jberthold

Reviewed By: simonmar, jberthold

Subscribers: simonmar, thomie

Differential Revision:

GHC Trac Issues: #9105
parent 1f6d1422
......@@ -76,11 +76,13 @@ handle_tick(int unused STG_UNUSED)
// 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.
if (!(RtsFlags.ProfFlags.doHeapProfile
|| RtsFlags.CcFlags.doCostCentres)) {
} else {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment