diff options
| author | Martin Pelikan <martin.pelikan@gmail.com> | 2017-09-27 04:48:03 +0000 |
|---|---|---|
| committer | Martin Pelikan <martin.pelikan@gmail.com> | 2017-09-27 04:48:03 +0000 |
| commit | 10c873f1d979c07b2e9d48e208f32dd075e64cab (patch) | |
| tree | d270dc9bbbd657218123d3389c36355e53cda101 /llvm/tools/llvm-xray | |
| parent | 015ccd08227972145381447b349c8bd07fcb6f01 (diff) | |
| download | bcm5719-llvm-10c873f1d979c07b2e9d48e208f32dd075e64cab.tar.gz bcm5719-llvm-10c873f1d979c07b2e9d48e208f32dd075e64cab.zip | |
[XRay] convert FDR arg1 log entries
Summary:
A new FDR metadata record will support logging a function call argument;
appending multiple metadata records will represent a sequence of arguments
meaning that "holes" are not representable by the buffer format. Each
call argument is currently a 64-bit value (useful for "this" pointers and
synchronization objects).
If present, we put this argument to the function call "entry" record it
belongs to, and alter its type to notify the user of its presence.
Reviewers: dberris
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32840
llvm-svn: 314269
Diffstat (limited to 'llvm/tools/llvm-xray')
| -rw-r--r-- | llvm/tools/llvm-xray/xray-account.cc | 3 | ||||
| -rw-r--r-- | llvm/tools/llvm-xray/xray-converter.cc | 3 | ||||
| -rw-r--r-- | llvm/tools/llvm-xray/xray-graph.cc | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/llvm/tools/llvm-xray/xray-account.cc b/llvm/tools/llvm-xray/xray-account.cc index 74907044848..0ba6cad5cca 100644 --- a/llvm/tools/llvm-xray/xray-account.cc +++ b/llvm/tools/llvm-xray/xray-account.cc @@ -146,7 +146,8 @@ bool LatencyAccountant::accountRecord(const XRayRecord &Record) { auto &ThreadStack = PerThreadFunctionStack[Record.TId]; switch (Record.Type) { - case RecordTypes::ENTER: { + case RecordTypes::ENTER: + case RecordTypes::ENTER_ARG: { ThreadStack.emplace_back(Record.FuncId, Record.TSC); break; } diff --git a/llvm/tools/llvm-xray/xray-converter.cc b/llvm/tools/llvm-xray/xray-converter.cc index 4769186a19e..f1aec65bc67 100644 --- a/llvm/tools/llvm-xray/xray-converter.cc +++ b/llvm/tools/llvm-xray/xray-converter.cc @@ -86,7 +86,7 @@ void TraceConverter::exportAsYAML(const Trace &Records, raw_ostream &OS) { Trace.Records.push_back({R.RecordType, R.CPU, R.Type, R.FuncId, Symbolize ? FuncIdHelper.SymbolOrNumber(R.FuncId) : llvm::to_string(R.FuncId), - R.TSC, R.TId}); + R.TSC, R.TId, R.CallArgs}); } Output Out(OS, nullptr, 0); Out << Trace; @@ -123,6 +123,7 @@ void TraceConverter::exportAsRAWv1(const Trace &Records, raw_ostream &OS) { Writer.write(static_cast<uint8_t>(R.CPU)); switch (R.Type) { case RecordTypes::ENTER: + case RecordTypes::ENTER_ARG: Writer.write(uint8_t{0}); break; case RecordTypes::EXIT: diff --git a/llvm/tools/llvm-xray/xray-graph.cc b/llvm/tools/llvm-xray/xray-graph.cc index da2d04cf0b9..9a2f837e6a3 100644 --- a/llvm/tools/llvm-xray/xray-graph.cc +++ b/llvm/tools/llvm-xray/xray-graph.cc @@ -208,7 +208,8 @@ Error GraphRenderer::accountRecord(const XRayRecord &Record) { auto &ThreadStack = PerThreadFunctionStack[Record.TId]; switch (Record.Type) { - case RecordTypes::ENTER: { + case RecordTypes::ENTER: + case RecordTypes::ENTER_ARG: { if (Record.FuncId != 0 && G.count(Record.FuncId) == 0) G[Record.FuncId].SymbolName = FuncIdHelper.SymbolOrNumber(Record.FuncId); ThreadStack.push_back({Record.FuncId, Record.TSC}); |

