summaryrefslogtreecommitdiff
path: root/rts/Profiling.c
diff options
context:
space:
mode:
authorMatthew Pickering <matthewtpickering@gmail.com>2021-03-05 11:20:39 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-03-08 18:25:19 -0500
commitbfa862503a9f8b2e8a61b9499d2cc3be789779fd (patch)
tree1d56c9d0165c49a65f33d62f66543b4d5163b7e2 /rts/Profiling.c
parent47d6acd3be1fadc0c59b7b4d4e105242c0ae0b90 (diff)
downloadhaskell-bfa862503a9f8b2e8a61b9499d2cc3be789779fd.tar.gz
eventlog: Repost initialisation events when eventlog restarts
If startEventlog is called after the program has already started running then quite a few useful events are missing from the eventlog because they are only posted when the program starts. This patch adds a mechanism to declare that an event should be reposted everytime the startEventlog function is called. Now in EventLog.c there is a global list of functions called `eventlog_header_funcs` which stores a list of functions which should be called everytime the eventlog starts. When calling `postInitEvent`, the event will not only be immediately posted to the eventlog but also added to the global list. When startEventLog is called, the list is traversed and the events reposted.
Diffstat (limited to 'rts/Profiling.c')
-rw-r--r--rts/Profiling.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/Profiling.c b/rts/Profiling.c
index c84296cd5d..e96f6b2b93 100644
--- a/rts/Profiling.c
+++ b/rts/Profiling.c
@@ -201,7 +201,7 @@ void initProfiling (void)
initTimeProfiling();
}
- dumpCostCentresToEventLog();
+ traceInitEvent(dumpCostCentresToEventLog);
}