summaryrefslogtreecommitdiffstats
path: root/llvm/lib/XRay/Trace.cpp
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2018-11-06 08:51:37 +0000
committerDean Michael Berris <dberris@google.com>2018-11-06 08:51:37 +0000
commit25f8d204b828c534dabd90700e4efa6764508094 (patch)
treeaa8c192fbad0f862530482b829ec5caf51f0d47a /llvm/lib/XRay/Trace.cpp
parentc1e530ee92ce8e0e6aa67677c4d0843f94b3ee05 (diff)
downloadbcm5719-llvm-25f8d204b828c534dabd90700e4efa6764508094.tar.gz
bcm5719-llvm-25f8d204b828c534dabd90700e4efa6764508094.zip
[XRay] Update XRayRecord to support Custom/Typed Events
Summary: This change cuts across LLVM and compiler-rt to add support for rendering custom events in the XRayRecord type, to allow for including user-provided annotations in the output YAML (as raw bytes). This work enables us to add custom event and typed event records into the `llvm::xray::Trace` type for user-provided events. This can then be programmatically handled through the C++ API and can be included in some of the tooling as well. For now we support printing the raw data we encounter in the custom events in the converted output. Future work will allow us to start interpreting these custom and typed events through a yet-to-be-defined API for extending the trace analysis library. Reviewers: mboerger Subscribers: hiraditya, llvm-commits Differential Revision: https://reviews.llvm.org/D54139 llvm-svn: 346214
Diffstat (limited to 'llvm/lib/XRay/Trace.cpp')
-rw-r--r--llvm/lib/XRay/Trace.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/XRay/Trace.cpp b/llvm/lib/XRay/Trace.cpp
index e7b878cb83f..37cd147078e 100644
--- a/llvm/lib/XRay/Trace.cpp
+++ b/llvm/lib/XRay/Trace.cpp
@@ -352,8 +352,9 @@ Error loadYAMLLog(StringRef Data, XRayFileHeader &FileHeader,
Records.clear();
std::transform(Trace.Records.begin(), Trace.Records.end(),
std::back_inserter(Records), [&](const YAMLXRayRecord &R) {
- return XRayRecord{R.RecordType, R.CPU, R.Type, R.FuncId,
- R.TSC, R.TId, R.PId, R.CallArgs};
+ return XRayRecord{R.RecordType, R.CPU, R.Type,
+ R.FuncId, R.TSC, R.TId,
+ R.PId, R.CallArgs, R.Data};
});
return Error::success();
}
OpenPOWER on IntegriCloud