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/RtsFlags.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/RtsFlags.c')
-rw-r--r-- | rts/RtsFlags.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/rts/RtsFlags.c b/rts/RtsFlags.c index e7375a0746..b23b19752b 100644 --- a/rts/RtsFlags.c +++ b/rts/RtsFlags.c @@ -235,6 +235,7 @@ void initRtsFlagsDefaults(void) RtsFlags.TraceFlags.sparks_sampled= false; RtsFlags.TraceFlags.sparks_full = false; RtsFlags.TraceFlags.user = false; + RtsFlags.TraceFlags.ticky = false; RtsFlags.TraceFlags.trace_output = NULL; #endif @@ -403,6 +404,9 @@ usage_text[] = { " p par spark events (sampled)", " f par spark events (full detail)", " u user events (emitted from Haskell code)", +#if defined(TICKY_TICKY) +" T ticky-ticky counter samples", +#endif " a all event classes above", # if defined(DEBUG) " t add time stamps (only useful with -v)", @@ -1855,6 +1859,11 @@ static void normaliseRtsOpts (void) "the compacting collector."); errorUsage(); } + + if (RtsFlags.TraceFlags.ticky && RtsFlags.TickyFlags.showTickyStats) { + barf("The ticky-ticky eventlog output cannot be used in conjunction with\n" + "+RTS -r<file>."); + } } static void errorUsage (void) @@ -2297,6 +2306,15 @@ static void read_trace_flags(const char *arg) RtsFlags.TraceFlags.user = enabled; enabled = true; break; + case 'T': +#if defined(TICKY_TICKY) + RtsFlags.TraceFlags.ticky = enabled; + enabled = true; + break; +#else + errorBelch("Program not compiled with ticky-ticky support"); + break; +#endif default: errorBelch("unknown trace option: %c",*c); break; |