summaryrefslogtreecommitdiff
path: root/rts/sm
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-03-09 13:53:04 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-14 12:56:21 -0400
commitb15c876d9406eb42104e2eabe05053e76448e09d (patch)
tree08a6e223656287511390e133cfa86cfeed257110 /rts/sm
parent1793ca9d43bd5e78eb9e7d6e4212bf6196812786 (diff)
downloadhaskell-b15c876d9406eb42104e2eabe05053e76448e09d.tar.gz
Make traceHeapEventInfo an init event
This means it will be reposted everytime the eventlog is started.
Diffstat (limited to 'rts/sm')
-rw-r--r--rts/sm/Storage.c24
1 files changed, 18 insertions, 6 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index 82e959e8d2..dc0dd7fd01 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -134,6 +134,22 @@ initGeneration (generation *gen, int g)
gen->old_weak_ptr_list = NULL;
}
+
+#if defined(TRACING)
+// Defined as it's own top-level function so it can be passed to traceInitEvent
+static void
+traceHeapInfo (void){
+ traceEventHeapInfo(CAPSET_HEAP_DEFAULT,
+ RtsFlags.GcFlags.generations,
+ RtsFlags.GcFlags.maxHeapSize * BLOCK_SIZE,
+ RtsFlags.GcFlags.minAllocAreaSize * BLOCK_SIZE,
+ MBLOCK_SIZE,
+ BLOCK_SIZE);
+}
+#else
+#define traceHeapInfo
+#endif
+
void
initStorage (void)
{
@@ -230,12 +246,8 @@ initStorage (void)
RELEASE_SM_LOCK;
- traceEventHeapInfo(CAPSET_HEAP_DEFAULT,
- RtsFlags.GcFlags.generations,
- RtsFlags.GcFlags.maxHeapSize * BLOCK_SIZE,
- RtsFlags.GcFlags.minAllocAreaSize * BLOCK_SIZE,
- MBLOCK_SIZE,
- BLOCK_SIZE);
+ traceInitEvent(traceHeapInfo);
+
}
void storageAddCapabilities (uint32_t from, uint32_t to)