[llvm] r337795 - llvm-xray: Broken chrome trace event format output

Dean Michael Berris via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 23 18:45:34 PDT 2018


Author: dberris
Date: Mon Jul 23 18:45:34 2018
New Revision: 337795

URL: http://llvm.org/viewvc/llvm-project?rev=337795&view=rev
Log:
llvm-xray: Broken chrome trace event format output

Summary:
Missing comma separator for EXIT and TAIL_EXIT RecordTypes emit invalid
JSON output for Chrome Trace Event Format.

Reviewers: dberris

Reviewed By: dberris

Subscribers: sammccall, kpw, llvm-commits

Differential Revision: https://reviews.llvm.org/D49687

Modified:
    llvm/trunk/tools/llvm-xray/xray-converter.cpp

Modified: llvm/trunk/tools/llvm-xray/xray-converter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-converter.cpp?rev=337795&r1=337794&r2=337795&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-xray/xray-converter.cpp (original)
+++ llvm/trunk/tools/llvm-xray/xray-converter.cpp Mon Jul 23 18:45:34 2018
@@ -313,6 +313,9 @@ void TraceConverter::exportAsChromeTrace
       // (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");




More information about the llvm-commits mailing list