llvm-project/compiler-rt/test
Petr Hosek d3db13af7e [profile] Support counter relocation at runtime
This is an alternative to the continous mode that was implemented in
D68351. This mode relies on padding and the ability to mmap a file over
the existing mapping which is generally only available on POSIX systems
and isn't suitable for other platforms.

This change instead introduces the ability to relocate counters at
runtime using a level of indirection. On every counter access, we add a
bias to the counter address. This bias is stored in a symbol that's
provided by the profile runtime and is initially set to zero, meaning no
relocation. The runtime can mmap the profile into memory at abitrary
location, and set bias to the offset between the original and the new
counter location, at which point every subsequent counter access will be
to the new location, which allows updating profile directly akin to the
continous mode.

The advantage of this implementation is that doesn't require any special
OS support. The disadvantage is the extra overhead due to additional
instructions required for each counter access (overhead both in terms of
binary size and performance) plus duplication of counters (i.e. one copy
in the binary itself and another copy that's mmapped).

Differential Revision: https://reviews.llvm.org/D69740
2020-01-17 15:02:23 -08:00
..
BlocksRuntime Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
asan Change `asan/TestCases/Darwin/malloc_zone-protected.cpp` to call abort so that it **always crashes**. 2019-12-16 16:37:50 -08:00
builtins [compiler-rt] [test] Disable MPROTECT on two builtin tests 2019-12-20 17:50:53 +01:00
cfi [cfi][test] cross-dso/stats.cpp: don't assume the order of static constructors 2020-01-08 15:50:51 -08:00
crt Fix include guard and properly order __deregister_frame_info. 2019-11-12 14:54:41 -08:00
dfsan compiler-rt: Rename .cc file in test/dfsan to cpp 2019-08-05 13:19:28 +00:00
fuzzer [compiler-rt] [fuzzer] Enable LSan in libFuzzer tests on NetBSD 2019-12-19 01:16:14 +01:00
gwp_asan compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
hwasan [compiler-rt] libhwasan interceptor ABI intercept longjmp/setjmp 2019-10-30 14:04:40 +00:00
interception [compiler-rt] Rename lit.*.cfg.* -> lit.*.cfg.py.* 2019-06-27 20:56:04 +00:00
lsan [compiler-rt] [test] Disable ASLR on LSAN+ASAN tests on NetBSD 2019-12-18 17:21:14 +01:00
msan [msan] Fix underflow in qsort interceptor. 2020-01-06 16:12:52 -08:00
profile [profile] Support counter relocation at runtime 2020-01-17 15:02:23 -08:00
safestack compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
sanitizer_common [iOS sim] Ensure simulator device is booted in iossim_prepare.py 2019-12-20 13:44:01 -08:00
scudo [Scudo] [GWP-ASan] Add GWP-ASan to Scudo Standalone. 2019-12-13 09:09:41 -08:00
shadowcallstack compiler-rt: Remove .cc from all lit config files 2019-08-05 19:25:35 +00:00
tsan [TSan] Pacify flaky test on Darwin 2019-12-11 12:56:52 -08:00
ubsan [compiler-rt] [test] Disable ASLR on UBSAN+[AMT]SAN tests on NetBSD 2019-12-18 17:21:15 +01:00
ubsan_minimal [UBSan][clang][compiler-rt] Applying non-zero offset to nullptr is undefined behaviour 2019-10-10 09:25:02 +00:00
xray [compiler-rt] [test] Disable MPROTECT for XRay tests on NetBSD 2019-12-20 22:08:01 +01:00
.clang-format [compiler-rt] Use "ColumnLimit: 0" instead of "clang-format off" in tests 2018-12-01 01:24:29 +00:00
CMakeLists.txt [compiler-rt] Disable fuzzer large.test when LLVM_ENABLE_EXPENSIVE_CHECKS=ON 2019-12-03 14:37:37 -08:00
lit.common.cfg.py [compiler-rt] [test] Disable MPROTECT on two builtin tests 2019-12-20 17:50:53 +01:00
lit.common.configured.in build: reduce CMake handling for zlib 2020-01-02 11:19:12 -08:00