rts: Fix gc timing
authorDouglas Wilson <douglas.wilson@gmail.com>
Wed, 15 Nov 2017 16:40:54 +0000 (11:40 -0500)
committerBen Gamari <ben@smart-cactus.org>
Wed, 15 Nov 2017 19:18:29 +0000 (14:18 -0500)
commitd9f0c24dd01b2f2a9a5ccc2fc45e93064d4ba0c1
tree3260f405b5d1dcc28b1353cb3dbf96e2b026d80b
parent383016b8ec3af3b0b1370e8966bba00397ddb848
rts: Fix gc timing

We were accumulating the gc times of the previous gc.
`stats.gc.{cpu,elappsed}_ns` were being accumulated into
`stats.gc_{cpu,elapsed}_ns` before they were set.

There is also a change in that heap profiling will no longer cause gc
events to
be emitted.

Reviewers: bgamari, erikd, simonmar

Reviewed By: bgamari

Subscribers: rwbarton, thomie

GHC Trac Issues: #14257, #14445

Differential Revision: https://phabricator.haskell.org/D4184
rts/Stats.c