summaryrefslogtreecommitdiff
path: root/rts/Capability.c
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 /rts/Capability.c
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 'rts/Capability.c')
-rw-r--r--rts/Capability.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/rts/Capability.c b/rts/Capability.c
index a655fc7b3f..dd24ce6681 100644
--- a/rts/Capability.c
+++ b/rts/Capability.c
@@ -23,6 +23,7 @@
#include "Schedule.h"
#include "Sparks.h"
#include "Trace.h"
+#include "eventlog/EventLog.h" // for flushLocalEventsBuf
#include "sm/GC.h" // for gcWorkerThread()
#include "STM.h"
#include "RtsUtils.h"
@@ -982,6 +983,10 @@ yieldCapability
debugTrace(DEBUG_nonmoving_gc, "Flushing update remembered set blocks...");
break;
+ case SYNC_FLUSH_EVENT_LOG:
+ flushLocalEventsBuf(cap);
+ break;
+
default:
break;
}