llvm-capstone/compiler-rt/include
Dean Michael Berris c360f41097 [XRay][compiler-rt] Implement logging implementation registration
Summary:
This change allows for registration of multiple logging implementations
through a central mechanism in XRay, mapping an implementation to a
"mode". Modes are strings that are used as keys to determine which
implementation to install through a single API. This mechanism allows
users to choose which implementation to install either from the
environment variable 'XRAY_OPTIONS' with the `xray_mode=` flag, or
programmatically using the `__xray_select_mode(...)` function.

Here, we introduce two API functions for the XRay logging:

__xray_log_register_mode(Mode, Impl): Associates an XRayLogImpl to a
string Mode. We can only have one implementation associated with a given
Mode.

__xray_log_select_mode(Mode): Finds the associated Impl for Mode and
installs it as if by calling `__xray_set_log_impl(...)`.

Along with these changes, we also deprecate the xray_naive_log and
xray_fdr_log flags and encourage users to instead use the xray_mode
flag.

Reviewers: kpw, dblaikie, eizan, pelikan

Subscribers: llvm-commits

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

llvm-svn: 319759
2017-12-05 12:08:56 +00:00
..
sanitizer [Sanitizers] New sanitizer API to purge allocator quarantine. 2017-10-23 17:12:07 +00:00
xray [XRay][compiler-rt] Implement logging implementation registration 2017-12-05 12:08:56 +00:00
CMakeLists.txt This patch causes the installation of headers for the sanitizer and/or xray to be disabled when COMPILER_RT_BUILD_SANITIZERS=OFF and/or COMPILER_RT_BUILD_XRAY=OFF. 2017-04-11 13:45:05 +00:00