diff options
author | Dean Michael Berris <dberris@google.com> | 2018-07-18 01:31:30 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2018-07-18 01:31:30 +0000 |
commit | f8e9626b112c22014212116b8d53dcc0d2c657d1 (patch) | |
tree | 03e24b968e3ba9a0f0f8be66d21b591a431bed1a /lib/xray/xray_function_call_trie.h | |
parent | 9d27f84cb4ddc9a9401507f60cb3ac09a37231a4 (diff) |
[XRay][compiler-rt] FDR Mode: Allow multiple runs
Summary:
Fix a bug in FDR mode which didn't allow for re-initialising the logging
in the same process. This change ensures that:
- When we flush the FDR mode logging, that the state of the logging
implementation is `XRAY_LOG_UNINITIALIZED`.
- Fix up the thread-local initialisation to use aligned storage and
`pthread_getspecific` as well as `pthread_setspecific` for the
thread-specific data.
- Actually use the pointer provided to the thread-exit cleanup handling,
instead of assuming that the thread has thread-local data associated
with it, and reaching at thread-exit time.
In this change we also have an explicit test for two consecutive
sessions for FDR mode tracing, and ensuring both sessions succeed.
Reviewers: kpw, eizan
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D49359
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@337341 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/xray/xray_function_call_trie.h')
0 files changed, 0 insertions, 0 deletions