diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2020-04-15 04:26:43 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-04-15 17:49:24 -0400 |
commit | ec77b2f16a78b13f54794c954953d8878dea9db2 (patch) | |
tree | 004e8b67b2a560f44f4bd476c83577f0c417ac38 /hadrian | |
parent | 22cc8e513fcfa89a4391f075534d903596a05895 (diff) | |
download | haskell-ec77b2f16a78b13f54794c954953d8878dea9db2.tar.gz |
rts: ProfHeap: Fix wrong time in last heap profile sample
We've had this longstanding issue in the heap profiler, where the time of
the last sample in the profile is sometimes way off causing the rendered
graph to be quite useless for long runs.
It seems to me the problem is that we use mut_user_time() for the last
sample as opposed to getRTSStats(), which we use when calling heapProfile()
in GC.c.
The former is equivalent to getProcessCPUTime() but the latter does
some additional stuff:
getProcessCPUTime() - end_init_cpu - stats.gc_cpu_ns -
stats.nonmoving_gc_cpu_ns
So to fix this just use getRTSStats() in both places.
Diffstat (limited to 'hadrian')
0 files changed, 0 insertions, 0 deletions