summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2021-02-25 12:31:55 -0500
committerBen Gamari <ben@smart-cactus.org>2021-03-01 10:11:39 -0500
commite18c430d1404347173e9bbb5c8cea2d39dbb23c8 (patch)
tree20a9cfd34c2dd78e88c5693a6f4ba2a9a0df2761
parent2628d61fb84674b8b891f4ad79837e61d7c65421 (diff)
downloadhaskell-e18c430d1404347173e9bbb5c8cea2d39dbb23c8.tar.gz
rts/eventlog: Flush MainCapability buffer in non-threaded RTS
Previously flushEventLog failed to flush anything but the global event buffer in the non-threaded RTS. Fixes #19436.
-rw-r--r--rts/eventlog/EventLog.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/rts/eventlog/EventLog.c b/rts/eventlog/EventLog.c
index ba374a71a5..ddd2cc02df 100644
--- a/rts/eventlog/EventLog.c
+++ b/rts/eventlog/EventLog.c
@@ -1667,6 +1667,8 @@ void flushEventLog(Capability **cap USED_IF_THREADS)
stopAllCapabilitiesWith(cap, task, SYNC_FLUSH_EVENT_LOG);
flushAllCapsEventsBufs();
releaseAllCapabilities(n_capabilities, cap ? *cap : NULL, task);
+#else
+ flushLocalEventsBuf(capabilities[0]);
#endif
flushEventLogWriter();
}