[XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata record entry...
authorDean Michael Berris <dberris@google.com>
Fri, 13 Jul 2018 05:38:22 +0000 (05:38 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 13 Jul 2018 05:38:22 +0000 (05:38 +0000)
commit10141261e1c18c07772ed3c96eecbe2e467d161c
tree9980444d3f6b2cc14ecbfd23c7c91b646a2843b1
parent2ab325ba23833b35ba137257378faf2cde7c13d0
[XRay][compiler-rt] Add PID field to llvm-xray tool and add PID metadata record entry in FDR mode

Summary:
llvm-xray changes:
- account-mode - process-id  {...} shows after thread-id
- convert-mode - process {...} shows after thread
- parses FDR and basic mode pid entries
- Checks version number for FDR log parsing.

Basic logging changes:
- Update header version from 2 -> 3

FDR logging changes:
- Update header version from 2 -> 3
- in writeBufferPreamble, there is an additional PID Metadata record (after thread id record and tsc record)

Test cases changes:
- fdr-mode.cc, fdr-single-thread.cc, fdr-thread-order.cc modified to catch process id output in the log.

Reviewers: dberris

Reviewed By: dberris

Subscribers: hiraditya, llvm-commits, #sanitizers

Differential Revision: https://reviews.llvm.org/D49153

llvm-svn: 336974
21 files changed:
compiler-rt/lib/xray/tests/unit/fdr_logging_test.cc
compiler-rt/lib/xray/xray_basic_logging.cc
compiler-rt/lib/xray/xray_fdr_log_records.h
compiler-rt/lib/xray/xray_fdr_logging.cc
compiler-rt/test/xray/TestCases/Posix/fdr-mode.cc
compiler-rt/test/xray/TestCases/Posix/fdr-single-thread.cc
compiler-rt/test/xray/TestCases/Posix/fdr-thread-order.cc
compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cc
llvm/include/llvm/XRay/XRayRecord.h
llvm/include/llvm/XRay/YAMLXRayRecord.h
llvm/lib/XRay/Trace.cpp
llvm/test/tools/llvm-xray/X86/Inputs/basic-log-arg1-version-3.xray [new file with mode: 0644]
llvm/test/tools/llvm-xray/X86/Inputs/basic-log-version-3.xray [new file with mode: 0644]
llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-arg1-version-3.xray [new file with mode: 0644]
llvm/test/tools/llvm-xray/X86/Inputs/fdr-log-version-3.xray [new file with mode: 0644]
llvm/test/tools/llvm-xray/X86/convert-basic-log-arg1-version3-to-yaml.txt [new file with mode: 0644]
llvm/test/tools/llvm-xray/X86/convert-basic-log-version3-to-yaml.txt [new file with mode: 0644]
llvm/test/tools/llvm-xray/X86/convert-fdr-log-arg1-version3-to-yaml.txt [new file with mode: 0644]
llvm/test/tools/llvm-xray/X86/convert-fdr-log-version3-to-yaml.txt [new file with mode: 0644]
llvm/tools/llvm-xray/xray-account.cpp
llvm/tools/llvm-xray/xray-converter.cpp