[PATCH] D49153: [XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata record entry in FDR mode

Henry Zhu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 11 20:09:45 PDT 2018


Maknee marked 2 inline comments as done.
Maknee added a comment.

In https://reviews.llvm.org/D49153#1159577, @dberris wrote:

> Thanks @Maknee -- now if you look in `llvm/test/tools/llvm-xray/X86` you'll find some tests for the llvm-xray tool. Also, in the `Inputs` sub-directory, you'll find sample XRay traces of the old versions. It would be great if you can add version 3 sample binary traces there and add more tests to ensure that we are getting the expected data from the tools handling the newer version(s) of the traces.


Okay, will do.



================
Comment at: llvm/lib/XRay/Trace.cpp:395
+         {
+           State.Expects = FDRState::Token::PID_RECORD;
+         }
----------------
Added check here to expect a PID_RECORD after WallTimeRecord if using version >= 3


================
Comment at: llvm/tools/llvm-xray/xray-account.cpp:479-481
+               R"({{type: {0}; cpu: {1}; record-type: {2}; function-id: {3}; tsc: {4}; thread-id: {5}; process-id: {6}}})",
+               Record.RecordType, Record.CPU, Record.Type, Record.FuncId, Record.TSC,
+               Record.TId, Record.PId)
----------------
dberris wrote:
> Did clang-format do this?
Oops. Forgot to run clang-format.


https://reviews.llvm.org/D49153





More information about the llvm-commits mailing list