From bfa862503a9f8b2e8a61b9499d2cc3be789779fd Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Fri, 5 Mar 2021 11:20:39 +0000 Subject: 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. --- rts/Profiling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rts/Profiling.c') 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); } -- cgit v1.2.1