[XRay] basic mode PID and TID always fetch
authorDean Michael Berris <dberris@google.com>
Wed, 11 Jul 2018 07:14:27 +0000 (07:14 +0000)
committerDean Michael Berris <dberris@google.com>
Wed, 11 Jul 2018 07:14:27 +0000 (07:14 +0000)
commit8299e4b8dbe34e7986ba99db554956800aded4b0
tree1d15b53031be2d389e9a604588aa9f5c696fac53
parent02867f0fa3e6bb1586a313a3cf4540f80538b02a
[XRay] basic mode PID and TID always fetch

Summary: XRayRecords now includes a PID field. Basic handlers fetch pid and tid each time they are called instead of caching the value. Added a testcase that calls fork and checks if the child TID is different from the parent TID to verify that the processes' TID are different in the trace.

Reviewers: dberris, Maknee

Reviewed By: dberris, Maknee

Subscribers: kpw, llvm-commits, #sanitizers

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

llvm-svn: 336769
compiler-rt/include/xray/xray_records.h
compiler-rt/lib/xray/xray_basic_logging.cc
compiler-rt/test/xray/TestCases/Posix/fork_basic_logging.cc [new file with mode: 0644]