[llvm] aca0639 - [ORC] Flush streams in WaitingOnGraphOpStreamRecorder record ops.

Lang Hames via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 10 06:12:57 PDT 2026


Author: Lang Hames
Date: 2026-03-11T00:12:49+11:00
New Revision: aca06396f9dfe26555acf4960ffeb23d8108f614

URL: https://github.com/llvm/llvm-project/commit/aca06396f9dfe26555acf4960ffeb23d8108f614
DIFF: https://github.com/llvm/llvm-project/commit/aca06396f9dfe26555acf4960ffeb23d8108f614.diff

LOG: [ORC] Flush streams in WaitingOnGraphOpStreamRecorder record ops.

Allows us to get useful recordings out of JIT sessions that crash, or are kept
alive indefinitely. (Note that an 'end' operation will have to be appended to
the output in these cases).

Added: 
    

Modified: 
    llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraphOpReplay.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraphOpReplay.h b/llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraphOpReplay.h
index 1866469c025cf..ab467c0eb7abe 100644
--- a/llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraphOpReplay.h
+++ b/llvm/include/llvm/ExecutionEngine/Orc/WaitingOnGraphOpReplay.h
@@ -57,17 +57,20 @@ class WaitingOnGraphOpStreamRecorder
   recordSimplify(const std::vector<std::unique_ptr<SuperNode>> &SNs) override {
     std::scoped_lock<std::mutex> Lock(M);
     recordSuperNodes("simplify-and-emit", SNs);
+    OS.flush();
   }
 
   void recordFail(const ContainerElementsMap &Failed) override {
     std::scoped_lock<std::mutex> Lock(M);
     OS << "fail\n";
     recordContainerElementsMap("  ", "failed", Failed);
+    OS.flush();
   }
 
   void recordEnd() override {
     std::scoped_lock<std::mutex> Lock(M);
     OS << "end\n";
+    OS.flush();
   }
 
   // Should render the container id as a string.


        


More information about the llvm-commits mailing list