summaryrefslogtreecommitdiff
path: root/rts/Capability.c
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-11 15:54:17 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-24 02:43:20 -0500
commitf88f43398217a5f4c2d326555e21fb1417a21db2 (patch)
treeb9d9e9d3de097959cc2463c2b21f5d3842ff6b86 /rts/Capability.c
parent6815603f271484766425ff2e37043b78da2d073c (diff)
downloadhaskell-f88f43398217a5f4c2d326555e21fb1417a21db2.tar.gz
rts: Flush eventlog buffers from flushEventLog
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;
}