diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-04-13 21:12:53 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2020-11-21 13:13:29 -0500 |
commit | 7e93ae8b2257c17d5ae5ef7832db723e897c8e8b (patch) | |
tree | 89e8f5af3d57e78177da45d13a3037912ad9eb7d /rts/Ticky.c | |
parent | 69bfbc216c2278c9796aa999c7815c19c12b0f2c (diff) | |
download | haskell-7e93ae8b2257c17d5ae5ef7832db723e897c8e8b.tar.gz |
rts: Post ticky entry counts to the eventlog
We currently only post the entry counters, not the other global
counters as in my experience the former are more useful. We use the heap
profiler's census period to decide when to dump.
Also spruces up the documentation surrounding ticky-ticky a bit.
Diffstat (limited to 'rts/Ticky.c')
-rw-r--r-- | rts/Ticky.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/rts/Ticky.c b/rts/Ticky.c index b46f91b204..83ba70887c 100644 --- a/rts/Ticky.c +++ b/rts/Ticky.c @@ -10,6 +10,8 @@ #include "PosixSource.h" #include "Rts.h" +#include "eventlog/EventLog.h" + /* Catch-all top-level counter struct. Allocations from CAFs will go * here. */ @@ -46,6 +48,10 @@ static void printRegisteredCounterInfo (FILE *); /* fwd decl */ void PrintTickyInfo(void) { + if (RtsFlags.TraceFlags.ticky) { + barf("Ticky eventlog output can't be used with +RTS -r<file>"); + } + unsigned long i; unsigned long tot_thk_enters = ENT_STATIC_THK_MANY_ctr + ENT_DYN_THK_MANY_ctr @@ -374,4 +380,19 @@ printRegisteredCounterInfo (FILE *tf) } } + +void emitTickyCounterDefs() +{ +#if defined(TRACING) + postTickyCounterDefs(ticky_entry_ctrs); +#endif +} + +void emitTickyCounterSamples() +{ +#if defined(TRACING) + postTickyCounterSamples(ticky_entry_ctrs); +#endif +} + #endif /* TICKY_TICKY */ |