summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2017-03-15 03:12:01 +0000
committerDean Michael Berris <dberris@google.com>2017-03-15 03:12:01 +0000
commitc6ee33852b177914a0f517f64401d21f50013c0f (patch)
tree0137c067dcad78e51e716a528271e65d7536ccb1 /lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp
parent66443d80f182393abd41ed95b2bdc7942746a659 (diff)
downloadbcm5719-llvm-c6ee33852b177914a0f517f64401d21f50013c0f.tar.gz
bcm5719-llvm-c6ee33852b177914a0f517f64401d21f50013c0f.zip
[XRay] [compiler-rt] Refactor logic for xray fdr logging. NFC.
Summary: Separated the IO and the thread local storage state machine of logging from the writing of log records once the contents are deterministic. Finer granularity functions are provided as inline functions in the same header such that stack does not grow due to the functions being separated. An executable utility xray_fdr_log_printer is also implemented to use the finest granularity functions to produce binary test data in the FDR format with a relatively convenient text input. For example, one can take a file with textual contents layed out in rows and feed it to the binary to generate data that llvm-xray convert can then read. This is a convenient way to build a test suite for llvm-xray convert to ensure it's robust to the fdr format. Example: $cat myFile.txt NewBuffer : { time = 2 , Tid=5} NewCPU : { CPU =1 , TSC = 123} Function : { FuncId = 5, TSCDelta = 3, EntryType = Entry } Function : { FuncId = 5, TSCDelta = 5, EntryType = Exit} TSCWrap : { TSC = 678 } Function : { FuncId = 6, TSCDelta = 0, EntryType = Entry } Function : { FuncId = 6, TSCDelta = 50, EntryType = Exit } EOB : { } $cat myFile.txt | ./bin/xray_fdr_log_printer > /tmp/binarydata.bin $./bin/llvm-xray convert -output-format=yaml -output=- /tmp/binarydata.bin yaml format comes out as expected. Reviewers: dberris, pelikan Reviewed By: dberris Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D30850 llvm-svn: 297801
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/anonymous-struct/main.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud