From a5b6b9842cc6353dbcf520c3774527be10273096 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Sat, 11 Apr 2020 15:54:17 -0400 Subject: 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. --- rts/Capability.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'rts/Capability.c') 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; } -- cgit v1.2.1