llvm-project/compiler-rt/test
Dean Michael Berris 364f11cdd3 [XRay][compiler-rt] Migrate basic mode logging to the XRay framework
Summary:
Before this patch, XRay's basic (naive mode) logging would be
initialised and installed in an adhoc manner. This patch ports the
implementation of the basic (naive mode) logging implementation to use
the common XRay framework.

We also make the following changes to reduce the variance between the
usage model of basic mode from FDR (flight data recorder) mode:

  - Allow programmatic control of the size of the buffers dedicated to
    per-thread records. This removes some hard-coded constants and turns
    them into runtime-controllable flags and through an Options
    structure.

  - Default the `xray_naive_log` option to false. For now, the only way
    to start basic mode is to set the environment variable, or set the
    default at build-time compiler options. Because of this change we've
    had to update a couple of tests relying on basic mode being always
    on.

  - Removed the reliance on a non-trivially destructible per-thread
    resource manager. We use a similar trick done in D39526 to use
    pthread_key_create() and pthread_setspecific() to ensure that the
    per-thread cleanup handling is performed at thread-exit time.

We also radically simplify the code structure for basic mode, to move
most of the implementation in the `__xray` namespace.

Reviewers: pelikan, eizan, kpw

Subscribers: llvm-commits

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

llvm-svn: 318734
2017-11-21 07:29:21 +00:00
..
BlocksRuntime
asan Enable PDB generation with lld in asan and cfi tests on Windows. 2017-11-17 19:49:41 +00:00
builtins [builtins][ARM] re-enable mulsc3_test.c on Arm 2017-11-16 13:00:17 +00:00
cfi Enable PDB generation with lld in asan and cfi tests on Windows. 2017-11-17 19:49:41 +00:00
dfsan [mips] XFAIL dfsan's custom.cc test on mips64. 2017-05-09 19:17:16 +00:00
esan [tsan] Update unittest for logging changes of r308637 2017-07-20 20:06:00 +00:00
fuzzer [libFuzzer] Fix flaky merge.test. 2017-11-17 00:11:12 +00:00
interception Revert "[interception] Check for export table's size before referring to its elements." 2017-01-22 03:30:14 +00:00
lsan [LSan] Disable a couple of failing tests on PPC64 (pending investigation). 2017-10-27 00:29:40 +00:00
msan [msan] Intercept __strxfrm_l. 2017-10-25 21:40:17 +00:00
profile Adjust test after r318159 2017-11-14 19:00:08 +00:00
safestack Factor out "stable-runtime" feature and enable it on all android. 2017-10-10 23:37:26 +00:00
sanitizer_common [tsan] Fix sigaction implementation when it's called only to get handler 2017-11-20 23:37:46 +00:00
scudo [scudo] Soft and hard RSS limit checks 2017-11-15 16:40:27 +00:00
tsan Implement GetTls() for NetBSD 2017-11-16 17:54:14 +00:00
ubsan sanitizer_common: Try looking up symbols with RTLD_DEFAULT if RTLD_NEXT does not work. 2017-11-10 22:09:37 +00:00
ubsan_minimal [ubsan] Support ubsan-minimal tests on Android. 2017-10-11 20:46:13 +00:00
xray [XRay][compiler-rt] Migrate basic mode logging to the XRay framework 2017-11-21 07:29:21 +00:00
CMakeLists.txt Allow compiler-rt test targets to work with multi-config CMake generators 2017-11-13 12:57:54 +00:00
lit.common.cfg Enable PDB generation with lld in asan and cfi tests on Windows. 2017-11-17 19:49:41 +00:00
lit.common.configured.in [asan] Add CMake hook to override shadow scale in compiler_rt 2017-11-13 14:02:27 +00:00