From 7e93ae8b2257c17d5ae5ef7832db723e897c8e8b Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Mon, 13 Apr 2020 21:12:53 -0400 Subject: 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. --- rts/sm/GC.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'rts/sm/GC.c') diff --git a/rts/sm/GC.c b/rts/sm/GC.c index 0dc92a29a0..0edc5f72ca 100644 --- a/rts/sm/GC.c +++ b/rts/sm/GC.c @@ -38,6 +38,7 @@ #include "Sanity.h" #include "BlockAlloc.h" #include "ProfHeap.h" +#include "Proftimer.h" #include "Weak.h" #include "Prelude.h" #include "RtsSignals.h" @@ -52,6 +53,7 @@ #include "CNF.h" #include "RtsFlags.h" #include "NonMoving.h" +#include "Ticky.h" #include // for memset() #include @@ -903,6 +905,16 @@ GarbageCollect (uint32_t collect_gen, ACQUIRE_SM_LOCK; } +#if defined(TICKY_TICKY) + // Post ticky counter sample. + // We do this at the end of execution since tickers are registered in the + // course of program execution. + if (performTickySample) { + emitTickyCounterSamples(); + performTickySample = false; + } +#endif + // send exceptions to any threads which were about to die RELEASE_SM_LOCK; resurrectThreads(resurrected_threads); -- cgit v1.2.1