summaryrefslogtreecommitdiff
path: root/includes/RtsAPI.h
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-11 15:54:17 -0400
committerBen Gamari <ben@smart-cactus.org>2020-11-21 14:12:45 -0500
commita5b6b9842cc6353dbcf520c3774527be10273096 (patch)
tree05eca2feae0d088ad4186be592efe7132fcf0546 /includes/RtsAPI.h
parent69bfbc216c2278c9796aa999c7815c19c12b0f2c (diff)
downloadhaskell-wip/T18043.tar.gz
rts: Flush eventlog buffers from flushEventLogwip/T18043
As noted in #18043, flushTrace failed flush anything beyond the writer. This means that a significant amount of data sitting in capability-local event buffers may never get flushed, despite the users' pleads for us to flush. Fix this by making flushEventLog flush all of the event buffers before flushing the writer. Fixes #18043.
Diffstat (limited to 'includes/RtsAPI.h')
-rw-r--r--includes/RtsAPI.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/RtsAPI.h b/includes/RtsAPI.h
index 36ab4d4b04..f88cd0614c 100644
--- a/includes/RtsAPI.h
+++ b/includes/RtsAPI.h
@@ -18,8 +18,6 @@ extern "C" {
#include "HsFFI.h"
#include "rts/Time.h"
#include "rts/Types.h"
-#include "rts/EventLogWriter.h"
-
/*
* Running the scheduler
@@ -60,6 +58,9 @@ typedef struct CapabilityPublic_ {
StgRegTable r;
} CapabilityPublic;
+/* N.B. this needs the Capability declaration above. */
+#include "rts/EventLogWriter.h"
+
/* ----------------------------------------------------------------------------
RTS configuration settings, for passing to hs_init_ghc()
------------------------------------------------------------------------- */