diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-12-21 21:23:00 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-01-17 05:48:01 -0500 |
commit | be3b6b57d1b77433c4d1d7bc2fa61cd95761877d (patch) | |
tree | abe34af8c5524903f33fb8bb9160ba5e393bcd8d | |
parent | 66e281fba605dd650d7c2530ab8a482bb79538cb (diff) | |
download | haskell-be3b6b57d1b77433c4d1d7bc2fa61cd95761877d.tar.gz |
rts/eventlog: Reset ticky counters after dumping sample
-rw-r--r-- | docs/users_guide/eventlog-formats.rst | 2 | ||||
-rw-r--r-- | rts/eventlog/EventLog.c | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/docs/users_guide/eventlog-formats.rst b/docs/users_guide/eventlog-formats.rst index 3c274ceea9..e0f4430a3f 100644 --- a/docs/users_guide/eventlog-formats.rst +++ b/docs/users_guide/eventlog-formats.rst @@ -885,4 +885,4 @@ entry counters to the eventlog. :field Word64: number of times this has been allocated (words). Only produced for modules compiled with :ghc-flag:`-ticky-allocd`. - Records the counter statistics at a moment in time. + Records the number of "ticks" recorded by a ticky-ticky counter single the last sample. diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c index 6c7d1e836c..8aeea789e6 100644 --- a/rts/eventlog/EventLog.c +++ b/rts/eventlog/EventLog.c @@ -1524,6 +1524,10 @@ static void postTickyCounterSample(EventsBuf *eb, StgEntCounter *p) postWord64(eb, p->entry_count); postWord64(eb, p->allocs); postWord64(eb, p->allocd); + + p->entry_count = 0; + p->allocs = 0; + p->allocd = 0; } void postTickyCounterSamples(StgEntCounter *counters) |