diff options
author | Ben Gamari <bgamari.foss@gmail.com> | 2016-01-27 11:05:23 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2016-01-27 11:32:15 +0100 |
commit | 1c6130d91420dc835c281bc9b13d603b7aa49b59 (patch) | |
tree | 06ee1125b2f8e8bd5f882326f864d9597188c4fb /rts/Timer.c | |
parent | 1f6d1422f9fe875e1d150b423c4864b42d96b8db (diff) | |
download | haskell-1c6130d91420dc835c281bc9b13d603b7aa49b59.tar.gz |
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: https://phabricator.haskell.org/D1844
GHC Trac Issues: #9105
Diffstat (limited to 'rts/Timer.c')
-rw-r--r-- | rts/Timer.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/rts/Timer.c b/rts/Timer.c index bf7240b96a..9136c60f20 100644 --- a/rts/Timer.c +++ b/rts/Timer.c @@ -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. -#ifndef PROFILING +#ifdef PROFILING if (!(RtsFlags.ProfFlags.doHeapProfile || RtsFlags.CcFlags.doCostCentres)) { stopTimer(); } +#else + stopTimer(); #endif } } else { |