diff options
| author | Dean Michael Berris <dberris@google.com> | 2018-07-24 01:45:34 +0000 |
|---|---|---|
| committer | Dean Michael Berris <dberris@google.com> | 2018-07-24 01:45:34 +0000 |
| commit | 833bb6fbdc98f7021a90153a3aac92505c32c9e7 (patch) | |
| tree | 69885f0256f18afdfa238a65ada386465b936215 /llvm/tools/llvm-xray/xray-converter.cpp | |
| parent | 2d37929c1087870d91a4140913318b91bc65bd4d (diff) | |
| download | bcm5719-llvm-833bb6fbdc98f7021a90153a3aac92505c32c9e7.tar.gz bcm5719-llvm-833bb6fbdc98f7021a90153a3aac92505c32c9e7.zip | |
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
llvm-svn: 337795
Diffstat (limited to 'llvm/tools/llvm-xray/xray-converter.cpp')
| -rw-r--r-- | llvm/tools/llvm-xray/xray-converter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/tools/llvm-xray/xray-converter.cpp b/llvm/tools/llvm-xray/xray-converter.cpp index 1563ef1faec..90e14d0d889 100644 --- a/llvm/tools/llvm-xray/xray-converter.cpp +++ b/llvm/tools/llvm-xray/xray-converter.cpp @@ -313,6 +313,9 @@ void TraceConverter::exportAsChromeTraceEventFormat(const Trace &Records, // (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"); |

