simark created this revision. Herald added subscribers: cfe-commits, omtcyfz, jkorous, MaskRay, ioeric, ilya-biryukov.
Let's say I use "CLANGD_TRACE=/tmp/clangd.json" and "tail -F /tmp/clangd.json", I'll often see unfinished lines, where the rest of the data is still in clangd's output buffer. Doing a flush in rawEvent makes sure we can see all the data immediatly. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D49260 Files: clangd/Trace.cpp Index: clangd/Trace.cpp =================================================================== --- clangd/Trace.cpp +++ clangd/Trace.cpp @@ -151,6 +151,7 @@ Event["ph"] = Phase; Out << Sep << formatv(JSONFormat, json::Value(std::move(Event))); Sep = ",\n"; + Out.flush(); } // If we haven't already, emit metadata describing this thread.
Index: clangd/Trace.cpp =================================================================== --- clangd/Trace.cpp +++ clangd/Trace.cpp @@ -151,6 +151,7 @@ Event["ph"] = Phase; Out << Sep << formatv(JSONFormat, json::Value(std::move(Event))); Sep = ",\n"; + Out.flush(); } // If we haven't already, emit metadata describing this thread.
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits