summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-03-09 13:53:04 +0000
committerMatthew Pickering <matthewtpickering@gmail.com>2021-03-11 11:40:57 +0000
commit8e2a1b19e7c44b835a030ede4d19d30ee8a173fa (patch)
tree48a436a02184bea05405446e6b3127e725d8e359
parent7a728ca6a52ff8c1a1ad43c81cf9289a61dca107 (diff)
downloadhaskell-wip/missed-trace-init.tar.gz
Make traceHeapEventInfo an init eventwip/missed-trace-init
This means it will be reposted everytime the eventlog is started.
-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)