[XRay][compiler-rt] Support string-based config for Basic mode.
authorDean Michael Berris <dberris@google.com>
Fri, 4 May 2018 06:27:53 +0000 (06:27 +0000)
committerDean Michael Berris <dberris@google.com>
Fri, 4 May 2018 06:27:53 +0000 (06:27 +0000)
commit47e6b8c2c74e18d1f3bf30a52790e1f1aafea5cc
tree3a33a627c21a47aa03d90bf0962a1716a86e3fb8
parent5c389ace7dbe2419ff62bfe4d26cf29be06db6a7
[XRay][compiler-rt] Support string-based config for Basic mode.

Summary:
This addresses http://llvm.org/PR36790.

This change allows the XRay Basic Mode implementation to use the
string-based initialization routine provided through
`__xray_log_init_mode(...)`. In the process, we've also deprecated some
flags defined for the `XRAY_OPTIONS` environment variable.

We then introduce another environment variable that can control the XRay
Basic Mode implementation through `XRAY_BASIC_OPTIONS`.

We also rename files from `xray_inmemory_log` to `xray_basic_logging` to
be more in line with the mode implementation.

Depends on D46174.

Reviewers: echristo, kpw, pelikan, eizan

Reviewed By: kpw

Subscribers: mgorny, llvm-commits

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

llvm-svn: 331507
compiler-rt/lib/xray/CMakeLists.txt
compiler-rt/lib/xray/xray_basic_flags.cc [new file with mode: 0644]
compiler-rt/lib/xray/xray_basic_flags.h [new file with mode: 0644]
compiler-rt/lib/xray/xray_basic_flags.inc [new file with mode: 0644]
compiler-rt/lib/xray/xray_basic_logging.cc [moved from compiler-rt/lib/xray/xray_inmemory_log.cc with 87% similarity]
compiler-rt/lib/xray/xray_basic_logging.h [moved from compiler-rt/lib/xray/xray_inmemory_log.h with 95% similarity]
compiler-rt/lib/xray/xray_flags.inc
compiler-rt/test/xray/TestCases/Posix/basic-filtering.cc