[compiler-rt] [XRay] Basic initialization and flag definition for XRay runtime
authorDean Michael Berris <dberris@google.com>
Wed, 20 Jul 2016 14:14:50 +0000 (14:14 +0000)
committerDean Michael Berris <dberris@google.com>
Wed, 20 Jul 2016 14:14:50 +0000 (14:14 +0000)
commite1c81d10d7710dba89ddda236f566dbcb74fa799
tree4aeec5f50e6deaa880c8660ac47ed3469f7ec6f3
parent080dcf7aa818a5432490d1b8149ccc4e2c0a6333
[compiler-rt] [XRay] Basic initialization and flag definition for XRay runtime

Summary:
This patch implements the initialisation and patching routines for the XRay runtime, along with the necessary trampolines for function entry/exit handling. For now we only define the basic hooks for allowing an implementation to define a handler that gets run on function entry/exit. We expose a minimal API for controlling the behaviour of the runtime (patching, cleanup, and setting the handler to invoke when instrumenting).

Depends on D19904

Reviewers: echristo, kcc, rnk

Subscribers: rnk, mehdi_amini, llvm-commits

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

llvm-svn: 276117
13 files changed:
compiler-rt/CMakeLists.txt
compiler-rt/cmake/config-ix.cmake
compiler-rt/include/CMakeLists.txt
compiler-rt/include/xray/xray_interface.h [new file with mode: 0644]
compiler-rt/lib/CMakeLists.txt
compiler-rt/lib/xray/CMakeLists.txt [new file with mode: 0644]
compiler-rt/lib/xray/xray_flags.cc [new file with mode: 0644]
compiler-rt/lib/xray/xray_flags.h [new file with mode: 0644]
compiler-rt/lib/xray/xray_flags.inc [new file with mode: 0644]
compiler-rt/lib/xray/xray_init.cc [new file with mode: 0644]
compiler-rt/lib/xray/xray_interface.cc [new file with mode: 0644]
compiler-rt/lib/xray/xray_interface_internal.h [new file with mode: 0644]
compiler-rt/lib/xray/xray_trampoline_x86.S [new file with mode: 0644]