<font size=2 face="sans-serif">Hi, </font><br><br><font size=2 face="sans-serif">It looks like your patch may have broken
the Power PC Little Endian buildbot. </font><br><font size=2 face="sans-serif"><br>Here is the link to the buildbot:<br></font><a href="http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/8365"><font size=2 color=blue face="sans-serif">http://lab.llvm.org:8011/builders/clang-ppc64le-linux-multistage/builds/8365</font></a><font size=2 face="sans-serif"><br></font><br><font size=2 face="sans-serif">Let me know if you have any questions.</font><br><br><font size=2 face="sans-serif">Thanks, </font><br><font size=2 face="sans-serif">Stefan</font><br><br><br><br><br><font size=1 color=#5f5f5f face="sans-serif">From:      
 </font><font size=1 face="sans-serif">Dean Michael Berris
via llvm-commits <llvm-commits@lists.llvm.org></font><br><font size=1 color=#5f5f5f face="sans-serif">To:      
 </font><font size=1 face="sans-serif">llvm-commits@lists.llvm.org</font><br><font size=1 color=#5f5f5f face="sans-serif">Date:      
 </font><font size=1 face="sans-serif">2018/11/06 03:54 AM</font><br><font size=1 color=#5f5f5f face="sans-serif">Subject:    
   </font><font size=1 face="sans-serif">[llvm] r346214
- [XRay] Update XRayRecord to support Custom/Typed Events</font><br><font size=1 color=#5f5f5f face="sans-serif">Sent by:    
   </font><font size=1 face="sans-serif">"llvm-commits"
<llvm-commits-bounces@lists.llvm.org></font><br><hr noshade><br><br><br><tt><font size=2>Author: dberris<br>Date: Tue Nov  6 00:51:37 2018<br>New Revision: 346214<br><br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project?rev=346214&view=rev"><tt><font size=2>http://llvm.org/viewvc/llvm-project?rev=346214&view=rev</font></tt></a><tt><font size=2><br>Log:<br>[XRay] Update XRayRecord to support Custom/Typed Events<br><br>Summary:<br>This change cuts across LLVM and compiler-rt to add support for<br>rendering custom events in the XRayRecord type, to allow for including<br>user-provided annotations in the output YAML (as raw bytes).<br><br>This work enables us to add custom event and typed event records into<br>the `llvm::xray::Trace` type for user-provided events. This can then be<br>programmatically handled through the C++ API and can be included in some<br>of the tooling as well. For now we support printing the raw data we<br>encounter in the custom events in the converted output.<br><br>Future work will allow us to start interpreting these custom and typed<br>events through a yet-to-be-defined API for extending the trace analysis<br>library.<br><br>Reviewers: mboerger<br><br>Subscribers: hiraditya, llvm-commits<br><br>Differential Revision: </font></tt><a href="https://reviews.llvm.org/D54139"><tt><font size=2>https://reviews.llvm.org/D54139</font></tt></a><tt><font size=2><br><br>Modified:<br>    llvm/trunk/include/llvm/XRay/FDRTraceExpander.h<br>    llvm/trunk/include/llvm/XRay/XRayRecord.h<br>    llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h<br>    llvm/trunk/lib/XRay/FDRTraceExpander.cpp<br>    llvm/trunk/lib/XRay/Profile.cpp<br>    llvm/trunk/lib/XRay/RecordPrinter.cpp<br>    llvm/trunk/lib/XRay/Trace.cpp<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-arg1-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-roundtrip.yaml<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-to-yaml.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-with-debug-syms.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt<br>    llvm/trunk/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt<br>    llvm/trunk/tools/llvm-xray/xray-account.cpp<br>    llvm/trunk/tools/llvm-xray/xray-converter.cpp<br>    llvm/trunk/tools/llvm-xray/xray-graph.cpp<br>    llvm/trunk/tools/llvm-xray/xray-stacks.cpp<br><br>Modified: llvm/trunk/include/llvm/XRay/FDRTraceExpander.h<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/XRay/FDRTraceExpander.h?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/XRay/FDRTraceExpander.h?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/include/llvm/XRay/FDRTraceExpander.h (original)<br>+++ llvm/trunk/include/llvm/XRay/FDRTraceExpander.h Tue Nov  6 00:51:37
2018<br>@@ -27,10 +27,10 @@ class TraceExpander : public RecordVisit<br>   int32_t PID = 0;<br>   int32_t TID = 0;<br>   uint64_t BaseTSC = 0;<br>-  XRayRecord CurrentRecord{0, 0, RecordTypes::ENTER, 0, 0, 0, 0,
{}};<br>+  XRayRecord CurrentRecord{0, 0, RecordTypes::ENTER, 0, 0, 0, 0,
{}, {}};<br>   uint16_t CPUId = 0;<br>   uint16_t LogVersion = 0;<br>-  bool BuildingFunction = false;<br>+  bool BuildingRecord = false;<br>   bool IgnoringRecords = false;<br> <br>   void resetCurrentRecord();<br><br>Modified: llvm/trunk/include/llvm/XRay/XRayRecord.h<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/XRay/XRayRecord.h?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/XRay/XRayRecord.h?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/include/llvm/XRay/XRayRecord.h (original)<br>+++ llvm/trunk/include/llvm/XRay/XRayRecord.h Tue Nov  6 00:51:37
2018<br>@@ -17,6 +17,7 @@<br> <br> #include <cstdint><br> #include <vector><br>+#include <string><br> <br> namespace llvm {<br> namespace xray {<br>@@ -54,10 +55,23 @@ struct XRayFileHeader {<br> /// This may or may not correspond to actual record types in the raw trace
(as<br> /// the loader implementation may synthesize this information in the process
of<br> /// of loading).<br>-enum class RecordTypes { ENTER, EXIT, TAIL_EXIT, ENTER_ARG };<br>+enum class RecordTypes {<br>+  ENTER,<br>+  EXIT,<br>+  TAIL_EXIT,<br>+  ENTER_ARG,<br>+  CUSTOM_EVENT,<br>+  TYPED_EVENT<br>+};<br> <br>+/// An XRayRecord is the denormalized view of data associated in a trace.
These<br>+/// records may not correspond to actual entries in the raw traces, but
they are<br>+/// the logical representation of records in a higher-level event log.<br> struct XRayRecord {<br>-  /// The type of record.<br>+  /// RecordType values are used as "sub-types" which have
meaning in the<br>+  /// context of the `Type` below. For function call and custom event
records,<br>+  /// the RecordType is always 0, while for typed events we store
the type in<br>+  /// the RecordType field.<br>   uint16_t RecordType;<br> <br>   /// The CPU where the thread is running. We assume number of CPUs
<= 65536.<br>@@ -66,7 +80,7 @@ struct XRayRecord {<br>   /// Identifies the type of record.<br>   RecordTypes Type;<br> <br>-  /// The function ID for the record.<br>+  /// The function ID for the record, if this is a function call
record.<br>   int32_t FuncId;<br> <br>   /// Get the full 8 bytes of the TSC when we get the log record.<br>@@ -80,6 +94,9 @@ struct XRayRecord {<br> <br>   /// The function call arguments.<br>   std::vector<uint64_t> CallArgs;<br>+<br>+  /// For custom and typed events, we provide the raw data from the
trace.<br>+  std::string Data;<br> };<br> <br> } // namespace xray<br><br>Modified: llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h (original)<br>+++ llvm/trunk/include/llvm/XRay/YAMLXRayRecord.h Tue Nov  6 00:51:37
2018<br>@@ -39,6 +39,7 @@ struct YAMLXRayRecord {<br>   uint32_t TId;<br>   uint32_t PId;<br>   std::vector<uint64_t> CallArgs;<br>+  std::string Data;<br> };<br> <br> struct YAMLXRayTrace {<br>@@ -58,6 +59,8 @@ template <> struct ScalarEnumerationTrai<br>     IO.enumCase(Type, "function-exit", xray::RecordTypes::EXIT);<br>     IO.enumCase(Type, "function-tail-exit", xray::RecordTypes::TAIL_EXIT);<br>     IO.enumCase(Type, "function-enter-arg", xray::RecordTypes::ENTER_ARG);<br>+    IO.enumCase(Type, "custom-event", xray::RecordTypes::CUSTOM_EVENT);<br>+    IO.enumCase(Type, "typed-event", xray::RecordTypes::TYPED_EVENT);<br>   }<br> };<br> <br>@@ -73,16 +76,16 @@ template <> struct MappingTraits<xray::Y<br> <br> template <> struct MappingTraits<xray::YAMLXRayRecord> {<br>   static void mapping(IO &IO, xray::YAMLXRayRecord &Record)
{<br>-    // FIXME: Make this type actually be descriptive<br>     IO.mapRequired("type", Record.RecordType);<br>-    IO.mapRequired("func-id", Record.FuncId);<br>+    IO.mapOptional("func-id", Record.FuncId);<br>     IO.mapOptional("function", Record.Function);<br>     IO.mapOptional("args", Record.CallArgs);<br>     IO.mapRequired("cpu", Record.CPU);<br>-    IO.mapRequired("thread", Record.TId);<br>+    IO.mapOptional("thread", Record.TId, 0U);<br>     IO.mapOptional("process", Record.PId, 0U);<br>     IO.mapRequired("kind", Record.Type);<br>     IO.mapRequired("tsc", Record.TSC);<br>+    IO.mapOptional("data", Record.Data);<br>   }<br> <br>   static constexpr bool flow = true;<br><br>Modified: llvm/trunk/lib/XRay/FDRTraceExpander.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/FDRTraceExpander.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/FDRTraceExpander.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/lib/XRay/FDRTraceExpander.cpp (original)<br>+++ llvm/trunk/lib/XRay/FDRTraceExpander.cpp Tue Nov  6 00:51:37 2018<br>@@ -12,10 +12,11 @@ namespace llvm {<br> namespace xray {<br> <br> void TraceExpander::resetCurrentRecord() {<br>-  if (BuildingFunction)<br>+  if (BuildingRecord)<br>     C(CurrentRecord);<br>-  BuildingFunction = false;<br>+  BuildingRecord = false;<br>   CurrentRecord.CallArgs.clear();<br>+  CurrentRecord.Data.clear();<br> }<br> <br> Error TraceExpander::visit(BufferExtents &) {<br>@@ -36,9 +37,18 @@ Error TraceExpander::visit(TSCWrapRecord<br>   return Error::success();<br> }<br> <br>-Error TraceExpander::visit(CustomEventRecord &) {<br>-  // TODO: Support custom event records in the future.<br>+Error TraceExpander::visit(CustomEventRecord &R) {<br>   resetCurrentRecord();<br>+  if (!IgnoringRecords) {<br>+    CurrentRecord.TSC = R.tsc();<br>+    CurrentRecord.CPU = R.cpu();<br>+    CurrentRecord.PId = PID;<br>+    CurrentRecord.TId = TID;<br>+    CurrentRecord.Type = RecordTypes::CUSTOM_EVENT;<br>+    std::copy(R.data().begin(), R.data().end(),<br>+              std::back_inserter(CurrentRecord.Data));<br>+    BuildingRecord = true;<br>+  }<br>   return Error::success();<br> }<br> <br>@@ -78,7 +88,7 @@ Error TraceExpander::visit(FunctionRecor<br>     CurrentRecord.PId = PID;<br>     CurrentRecord.TId = TID;<br>     CurrentRecord.CPU = CPUId;<br>-    BuildingFunction = true;<br>+    BuildingRecord = true;<br>   }<br>   return Error::success();<br> }<br><br>Modified: llvm/trunk/lib/XRay/Profile.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/Profile.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/Profile.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/lib/XRay/Profile.cpp (original)<br>+++ llvm/trunk/lib/XRay/Profile.cpp Tue Nov  6 00:51:37 2018<br>@@ -374,6 +374,12 @@ Expected<Profile> profileFromTrace(const<br>       }<br> <br>       break;<br>+<br>+    case RecordTypes::CUSTOM_EVENT:<br>+    case RecordTypes::TYPED_EVENT:<br>+      // TODO: Support an extension point to allow handling
of custom and typed<br>+      // events in profiles.<br>+      break;<br>     }<br>   }<br> <br><br>Modified: llvm/trunk/lib/XRay/RecordPrinter.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/RecordPrinter.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/RecordPrinter.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/lib/XRay/RecordPrinter.cpp (original)<br>+++ llvm/trunk/lib/XRay/RecordPrinter.cpp Tue Nov  6 00:51:37 2018<br>@@ -81,6 +81,10 @@ Error RecordPrinter::visit(FunctionRecor<br>     OS << formatv("<Function Tail Exit: #{0} delta
= +{1}>", R.functionId(),<br>                   R.delta());<br>     break;<br>+  case RecordTypes::CUSTOM_EVENT:<br>+  case RecordTypes::TYPED_EVENT:<br>+    // TODO: Flag as a bug?<br>+    break;<br>   }<br>   OS << Delim;<br>   return Error::success();<br><br>Modified: llvm/trunk/lib/XRay/Trace.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/Trace.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/XRay/Trace.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/lib/XRay/Trace.cpp (original)<br>+++ llvm/trunk/lib/XRay/Trace.cpp Tue Nov  6 00:51:37 2018<br>@@ -352,8 +352,9 @@ Error loadYAMLLog(StringRef Data, XRayFi<br>   Records.clear();<br>   std::transform(Trace.Records.begin(), Trace.Records.end(),<br>                  std::back_inserter(Records),
[&](const YAMLXRayRecord &R) {<br>-                   return
XRayRecord{R.RecordType, R.CPU, R.Type, R.FuncId,<br>-                    
                R.TSC,    
   R.TId, R.PId,  R.CallArgs};<br>+                   return
XRayRecord{R.RecordType, R.CPU,      R.Type,<br>+                    
                R.FuncId,  
  R.TSC,      R.TId,<br>+                    
                R.PId,    
   R.CallArgs, R.Data};<br>                  });<br>   return Error::success();<br> }<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt
(original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-basic-arg1-to-yaml.txt
Tue Nov  6 00:51:37 2018<br>@@ -8,8 +8,8 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 3500000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 17,
thread: 8715, kind: function-enter, tsc: 22555670288232728 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 17,
thread: 8715, kind: function-exit, tsc: 22555670288334784 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', args: [ 1
], cpu: 17, thread: 8715, kind: function-enter-arg, tsc: 22555670288335768
}<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 17,
thread: 8715, kind: function-exit, tsc: 22555670288365224 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 17,
thread: 8715, kind: function-enter, tsc: 22555670288232728, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 17,
thread: 8715, kind: function-exit, tsc: 22555670288334784, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', args: [ 1
], cpu: 17, thread: 8715, kind: function-enter-arg, tsc: 22555670288335768,
data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 17,
thread: 8715, kind: function-exit, tsc: 22555670288365224, data: '' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt
(original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt
Tue Nov  6 00:51:37 2018<br>@@ -8,10 +8,10 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 3900000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 0, thread:
2590, process: 2590, kind: function-enter, tsc: 2033303630902004 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 0, thread:
2590, process: 2590, kind: function-exit, tsc: 2033403115246844 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 0, thread:
2590, process: 2590, kind: function-enter, tsc: 2033490200702516 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 0, thread:
2590, process: 2590, kind: function-exit, tsc: 2033504122687120 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', args: [ 67
], cpu: 0, thread: 2590, process: 2590, kind: function-enter-arg, tsc:
2033505343905936 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 0, thread:
2590, process: 2590, kind: function-exit, tsc: 2033505343936752 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 0, thread:
2590, process: 2590, kind: function-enter, tsc: 2033303630902004, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 0, thread:
2590, process: 2590, kind: function-exit, tsc: 2033403115246844, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 0, thread:
2590, process: 2590, kind: function-enter, tsc: 2033490200702516, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 0, thread:
2590, process: 2590, kind: function-exit, tsc: 2033504122687120, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', args: [ 67
], cpu: 0, thread: 2590, process: 2590, kind: function-enter-arg, tsc:
2033505343905936, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 0, thread:
2590, process: 2590, kind: function-exit, tsc: 2033505343936752, data:
'' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt
(original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt
Tue Nov  6 00:51:37 2018<br>@@ -8,12 +8,12 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 3900000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070767347414784 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070767347496472 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070768324320264 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070768324344100 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070768921602152 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070768921625968 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070769627174140 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070769627197624 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070767347414784, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070767347496472, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070768324320264, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070768324344100, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070768921602152, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070768921625968, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-enter, tsc: 2070769627174140, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 7, thread:
25518, process: 25518, kind: function-exit, tsc: 2070769627197624, data:
'' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-arg1-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-arg1-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-arg1-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-arg1-to-yaml.txt (original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-arg1-to-yaml.txt Tue
Nov  6 00:51:37 2018<br>@@ -8,6 +8,6 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 3500000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', args: [ 1
], cpu: 49, thread: 14648, kind: function-enter-arg, tsc: 18828908666543318
}<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 49,
thread: 14648, kind: function-exit, tsc: 18828908666595604 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', args: [ 1
], cpu: 49, thread: 14648, kind: function-enter-arg, tsc: 18828908666543318,
data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 49,
thread: 14648, kind: function-exit, tsc: 18828908666595604, data: '' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt
(original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt
Tue Nov  6 00:51:37 2018<br>@@ -8,10 +8,10 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 3900000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 6, thread:
2631, process: 2631, kind: function-enter, tsc: 2034042117104344 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 6, thread:
2631, process: 2631, kind: function-exit, tsc: 2034042117199088 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 6, thread:
2631, process: 2631, kind: function-enter, tsc: 2034043145686378 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 6, thread:
2631, process: 2631, kind: function-exit, tsc: 2034043145762200 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', args: [ 67
], cpu: 6, thread: 2631, process: 2631, kind: function-enter-arg, tsc:
2034049739853430 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 6, thread:
2631, process: 2631, kind: function-exit, tsc: 2034049739878154 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 6, thread:
2631, process: 2631, kind: function-enter, tsc: 2034042117104344, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 6, thread:
2631, process: 2631, kind: function-exit, tsc: 2034042117199088, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 6, thread:
2631, process: 2631, kind: function-enter, tsc: 2034043145686378, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 6, thread:
2631, process: 2631, kind: function-exit, tsc: 2034043145762200, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', args: [ 67
], cpu: 6, thread: 2631, process: 2631, kind: function-enter-arg, tsc:
2034049739853430, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 6, thread:
2631, process: 2631, kind: function-exit, tsc: 2034049739878154, data:
'' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt
(original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt
Tue Nov  6 00:51:37 2018<br>@@ -8,10 +8,10 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 3900000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-enter, tsc: 2069294857657498 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-exit, tsc: 2069294857707502 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 4, thread:
25190, process: 25190, kind: function-enter, tsc: 2069295590705912 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 4, thread:
25190, process: 25190, kind: function-exit, tsc: 2069295590734308 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-enter, tsc: 2069296377598128 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-exit, tsc: 2069296377627032 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-enter, tsc: 2069294857657498, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-exit, tsc: 2069294857707502, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 4, thread:
25190, process: 25190, kind: function-enter, tsc: 2069295590705912, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 4, thread:
25190, process: 25190, kind: function-exit, tsc: 2069295590734308, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-enter, tsc: 2069296377598128, data:
'' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 4, thread:
25190, process: 25190, kind: function-exit, tsc: 2069296377627032, data:
'' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt (original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-fdr-to-yaml.txt Tue Nov
 6 00:51:37 2018<br>@@ -8,17 +8,17 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 5678<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407340 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 5, thread:
5, kind: function-exit, tsc: 7238225556407346 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407347 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407387 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 5, thread:
5, kind: function-exit, tsc: 7238225556407437 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 5, thread:
5, kind: function-exit, tsc: 7238225556407467 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 4, function: '4', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407492 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 5, function: '5', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407517 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 5, function: '5', cpu: 5, thread:
5, kind: function-tail-exit, tsc: 7238225556407542 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 268435455, function: '268435455',
cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407552 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 268435455, function: '268435455',
cpu: 5, thread: 5, kind: function-exit, tsc: 7238225556407562 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 6, function: '6', cpu: 6, thread:
5, kind: function-enter, tsc: 7238225556407682 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 6, function: '6', cpu: 6, thread:
5, kind: function-exit, tsc: 7238225556407755 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407340, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 5, thread:
5, kind: function-exit, tsc: 7238225556407346, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407347, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407387, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 5, thread:
5, kind: function-exit, tsc: 7238225556407437, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 5, thread:
5, kind: function-exit, tsc: 7238225556407467, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 4, function: '4', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407492, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 5, function: '5', cpu: 5, thread:
5, kind: function-enter, tsc: 7238225556407517, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 5, function: '5', cpu: 5, thread:
5, kind: function-tail-exit, tsc: 7238225556407542, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 268435455, function: '268435455',
cpu: 5, thread: 5, kind: function-enter, tsc: 7238225556407552, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 268435455, function: '268435455',
cpu: 5, thread: 5, kind: function-exit, tsc: 7238225556407562, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 6, function: '6', cpu: 6, thread:
5, kind: function-enter, tsc: 7238225556407682, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 6, function: '6', cpu: 6, thread:
5, kind: function-exit, tsc: 7238225556407755, data: '' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-roundtrip.yaml<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-roundtrip.yaml?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-roundtrip.yaml?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-roundtrip.yaml (original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-roundtrip.yaml Tue Nov
 6 00:51:37 2018<br>@@ -19,6 +19,6 @@ records:<br> #CHECK-NEXT:    nonstop-tsc: true<br> #CHECK-NEXT:    cycle-frequency: 2601000000<br> #CHECK-NEXT:  records:<br>-#CHECK-NEXT:    - { type: 0, func-id: 1, function: '1', cpu:
1, thread: 111, kind: function-enter, tsc: 10001 }<br>-#CHECK-NEXT:    - { type: 0, func-id: 1, function: '1', cpu:
1, thread: 111, kind: function-exit, tsc: 10100 }<br>+#CHECK-NEXT:    - { type: 0, func-id: 1, function: '1', cpu:
1, thread: 111, kind: function-enter, tsc: 10001, data: '' }<br>+#CHECK-NEXT:    - { type: 0, func-id: 1, function: '1', cpu:
1, thread: 111, kind: function-exit, tsc: 10100, data: '' }<br> #CHECK-NEXT:  ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-to-yaml.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-to-yaml.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-to-yaml.txt (original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-to-yaml.txt Tue Nov  6
00:51:37 2018<br>@@ -8,10 +8,10 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 2601000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841453914 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454542 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454670 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454762 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454802 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841494828 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841453914, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454542, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454670, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454762, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454802, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841494828, data: '' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-with-debug-syms.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-with-debug-syms.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-with-debug-syms.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-with-debug-syms.txt (original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-with-debug-syms.txt Tue
Nov  6 00:51:37 2018<br>@@ -8,10 +8,10 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 2601000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: main, cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841453914 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454542 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454670 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454762 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454802 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: main, cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841494828 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: main, cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841453914, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454542, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: {{.*foo.*}}, cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454670, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454762, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: {{.*bar.*}}, cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454802, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: main, cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841494828, data: '' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt
(original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-with-standalone-instrmap.txt
Tue Nov  6 00:51:37 2018<br>@@ -8,10 +8,10 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 2601000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '@(41caa0)', cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841453914 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '@(41ca70)', cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454542 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '@(41ca70)', cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454670 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '@(41ca40)', cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454762 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '@(41ca40)', cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454802 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '@(41caa0)', cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841494828 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '@(41caa0)', cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841453914, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '@(41ca70)', cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454542, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '@(41ca70)', cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454670, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '@(41ca40)', cpu:
37, thread: 84697, kind: function-enter, tsc: 3315356841454762, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '@(41ca40)', cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841454802, data: ''
}<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '@(41caa0)', cpu:
37, thread: 84697, kind: function-exit, tsc: 3315356841494828, data: ''
}<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt
(original)<br>+++ llvm/trunk/test/tools/llvm-xray/X86/convert-with-yaml-instrmap.txt
Tue Nov  6 00:51:37 2018<br>@@ -8,10 +8,10 @@<br> ; CHECK-NEXT:   nonstop-tsc:     true<br> ; CHECK-NEXT:   cycle-frequency: 2601000000<br> ; CHECK-NEXT: records:<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841453914 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454542 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454670 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454762 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454802 }<br>-; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841494828 }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841453914, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454542, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 2, function: '2', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454670, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-enter, tsc: 3315356841454762, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 1, function: '1', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841454802, data: '' }<br>+; CHECK-NEXT:   - { type: 0, func-id: 3, function: '3', cpu: 37,
thread: 84697, kind: function-exit, tsc: 3315356841494828, data: '' }<br> ; CHECK-NEXT: ...<br><br>Modified: llvm/trunk/tools/llvm-xray/xray-account.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-account.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-account.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/tools/llvm-xray/xray-account.cpp (original)<br>+++ llvm/trunk/tools/llvm-xray/xray-account.cpp Tue Nov  6 00:51:37
2018<br>@@ -146,6 +146,10 @@ bool LatencyAccountant::accountRecord(co<br> <br>   auto &ThreadStack = PerThreadFunctionStack[Record.TId];<br>   switch (Record.Type) {<br>+  case RecordTypes::CUSTOM_EVENT:<br>+  case RecordTypes::TYPED_EVENT:<br>+    // TODO: Support custom and typed event accounting in the
future.<br>+    return true;<br>   case RecordTypes::ENTER:<br>   case RecordTypes::ENTER_ARG: {<br>     ThreadStack.emplace_back(Record.FuncId, Record.TSC);<br>@@ -417,19 +421,25 @@ namespace llvm {<br> template <> struct format_provider<llvm::xray::RecordTypes>
{<br>   static void format(const llvm::xray::RecordTypes &T, raw_ostream
&Stream,<br>                    
 StringRef Style) {<br>-    switch(T) {<br>-      case RecordTypes::ENTER:<br>-        Stream << "enter";<br>-        break;<br>-      case RecordTypes::ENTER_ARG:<br>-        Stream << "enter-arg";<br>-        break;<br>-      case RecordTypes::EXIT:<br>-        Stream << "exit";<br>-        break;<br>-      case RecordTypes::TAIL_EXIT:<br>-        Stream << "tail-exit";<br>-        break;<br>+    switch (T) {<br>+    case RecordTypes::ENTER:<br>+      Stream << "enter";<br>+      break;<br>+    case RecordTypes::ENTER_ARG:<br>+      Stream << "enter-arg";<br>+      break;<br>+    case RecordTypes::EXIT:<br>+      Stream << "exit";<br>+      break;<br>+    case RecordTypes::TAIL_EXIT:<br>+      Stream << "tail-exit";<br>+      break;<br>+    case RecordTypes::CUSTOM_EVENT:</font></tt><br><tt><font size=2>+      Stream << "custom-event";<br>+      break;<br>+    case RecordTypes::TYPED_EVENT:<br>+      Stream << "typed-event";<br>+      break;<br>     }<br>   }<br> };<br><br>Modified: llvm/trunk/tools/llvm-xray/xray-converter.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-converter.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-converter.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/tools/llvm-xray/xray-converter.cpp (original)<br>+++ llvm/trunk/tools/llvm-xray/xray-converter.cpp Tue Nov  6 00:51:37
2018<br>@@ -92,9 +92,10 @@ void TraceConverter::exportAsYAML(const<br>     Trace.Records.push_back({R.RecordType, R.CPU, R.Type, R.FuncId,<br>                    
         Symbolize ? FuncIdHelper.SymbolOrNumber(R.FuncId)<br>                    
                   :
llvm::to_string(R.FuncId),<br>-                    
        R.TSC, R.TId, R.PId, R.CallArgs});<br>+                    
        R.TSC, R.TId, R.PId, R.CallArgs, R.Data});<br>   }<br>   Output Out(OS, nullptr, 0);<br>+  Out.setWriteDefaultValues(false);<br>   Out << Trace;<br> }<br> <br>@@ -123,21 +124,27 @@ void TraceConverter::exportAsRAWv1(const<br>   // Then write out the rest of the records, still in an endian-appropriate<br>   // format.<br>   for (const auto &R : Records) {<br>-    Writer.write(R.RecordType);<br>-    // The on disk naive raw format uses 8 bit CPUs, but the
record has 16.<br>-    // There's no choice but truncation.<br>-    Writer.write(static_cast<uint8_t>(R.CPU));<br>     switch (R.Type) {<br>     case RecordTypes::ENTER:<br>     case RecordTypes::ENTER_ARG:<br>+      Writer.write(R.RecordType);<br>+      Writer.write(static_cast<uint8_t>(R.CPU));<br>       Writer.write(uint8_t{0});<br>       break;<br>     case RecordTypes::EXIT:<br>+      Writer.write(R.RecordType);<br>+      Writer.write(static_cast<uint8_t>(R.CPU));<br>       Writer.write(uint8_t{1});<br>       break;<br>     case RecordTypes::TAIL_EXIT:<br>+      Writer.write(R.RecordType);<br>+      Writer.write(static_cast<uint8_t>(R.CPU));<br>       Writer.write(uint8_t{2});<br>       break;<br>+    case RecordTypes::CUSTOM_EVENT:<br>+    case RecordTypes::TYPED_EVENT:<br>+      // Skip custom and typed event records for v1 logs.<br>+      continue;<br>     }<br>     Writer.write(R.FuncId);<br>     Writer.write(R.TSC);<br>@@ -264,6 +271,10 @@ void TraceConverter::exportAsChromeTrace<br>     double EventTimestampUs = double(1000000) / CycleFreq *
double(R.TSC);<br>     StackTrieNode *&StackCursor = StackCursorByThreadId[R.TId];<br>     switch (R.Type) {<br>+    case RecordTypes::CUSTOM_EVENT:<br>+    case RecordTypes::TYPED_EVENT:<br>+      // TODO: Support typed and custom event rendering
on Chrome Trace Viewer.<br>+      break;<br>     case RecordTypes::ENTER:<br>     case RecordTypes::ENTER_ARG:<br>       StackCursor = findOrCreateStackNode(StackCursor,
R.FuncId, R.TId,<br><br>Modified: llvm/trunk/tools/llvm-xray/xray-graph.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-graph.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-graph.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/tools/llvm-xray/xray-graph.cpp (original)<br>+++ llvm/trunk/tools/llvm-xray/xray-graph.cpp Tue Nov  6 00:51:37
2018<br>@@ -246,6 +246,10 @@ Error GraphRenderer::accountRecord(const<br>     updateStat(G[Record.FuncId].S, D);<br>     break;<br>   }<br>+  case RecordTypes::CUSTOM_EVENT:<br>+  case RecordTypes::TYPED_EVENT:<br>+    // TODO: Support custom and typed events in the graph processing?<br>+    break;<br>   }<br> <br>   return Error::success();<br><br>Modified: llvm/trunk/tools/llvm-xray/xray-stacks.cpp<br>URL: </font></tt><a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-stacks.cpp?rev=346214&r1=346213&r2=346214&view=diff"><tt><font size=2>http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-xray/xray-stacks.cpp?rev=346214&r1=346213&r2=346214&view=diff</font></tt></a><tt><font size=2><br>==============================================================================<br>--- llvm/trunk/tools/llvm-xray/xray-stacks.cpp (original)<br>+++ llvm/trunk/tools/llvm-xray/xray-stacks.cpp Tue Nov  6 00:51:37
2018<br>@@ -366,6 +366,9 @@ public:<br>                    
                AccountRecordState
*state) {<br>     auto &TS = ThreadStackMap[R.TId];<br>     switch (R.Type) {<br>+    case RecordTypes::CUSTOM_EVENT:<br>+    case RecordTypes::TYPED_EVENT:<br>+      return AccountRecordStatus::OK;<br>     case RecordTypes::ENTER:<br>     case RecordTypes::ENTER_ARG: {<br>       state->wasLastRecordExit = false;<br><br><br>_______________________________________________<br>llvm-commits mailing list<br>llvm-commits@lists.llvm.org<br></font></tt><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits"><tt><font size=2>http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</font></tt></a><tt><font size=2><br><br></font></tt><br><BR>