Index: tools/llvm-xray/xray-converter.cpp =================================================================== --- tools/llvm-xray/xray-converter.cpp +++ tools/llvm-xray/xray-converter.cpp @@ -313,6 +313,9 @@ // (And/Or in loop termination below) StackTrieNode *PreviousCursor = nullptr; do { + if (PreviousCursor != nullptr) { + OS << ",\n"; + } writeTraceViewerRecord(Version, OS, StackCursor->FuncId, R.TId, R.PId, Symbolize, FuncIdHelper, EventTimestampUs, *StackCursor, "E");