rts: Disable tick timer unless really needed
authorBen Gamari <bgamari.foss@gmail.com>
Fri, 22 Jan 2016 15:22:13 +0000 (16:22 +0100)
committerBen Gamari <ben@smart-cactus.org>
Fri, 22 Jan 2016 17:50:27 +0000 (18:50 +0100)
commitb01288d509b0f9e45f23ae48f2366f85f489089c
treeebadcb0038b79d135929e3e3e6f6fa4406b99b6f
parent4d51bfc8975f9c6c3ab6d293c48f98da85210d5f
rts: Disable tick timer unless really needed

Trac #9105 notes significant CPU usage by an otherwise idle process when
compiled with profiling. The reason for this is that we keep the tick
timer active in the profiling RTS even if profiling wasn't requested at
runtime.

If the user requests any sort of profiling then we need to keep the
timer active to ensure that samples are collected.

Test Plan: Validate, check CPU usage, ensure profiling still works

Reviewers: simonmar, austin

Reviewed By: simonmar, austin

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1822

GHC Trac Issues: #9105
rts/Timer.c