summaryrefslogtreecommitdiff
path: root/rts/sm/GC.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-13 21:12:53 -0400
committerBen Gamari <ben@smart-cactus.org>2020-11-21 13:13:29 -0500
commit7e93ae8b2257c17d5ae5ef7832db723e897c8e8b (patch)
tree89e8f5af3d57e78177da45d13a3037912ad9eb7d /rts/sm/GC.c
parent69bfbc216c2278c9796aa999c7815c19c12b0f2c (diff)
downloadhaskell-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/sm/GC.c')
-rw-r--r--rts/sm/GC.c12
1 files changed, 12 insertions, 0 deletions
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 <string.h> // for memset()
#include <unistd.h>
@@ -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);