[compiler-rt][XRay] Implement __xray_unpatch() and __xray_remove_handler()
authorDean Michael Berris <dberris@google.com>
Mon, 8 Aug 2016 03:10:22 +0000 (03:10 +0000)
committerDean Michael Berris <dberris@google.com>
Mon, 8 Aug 2016 03:10:22 +0000 (03:10 +0000)
commit68e74847bf211cdf3e4e53f8676f81c536fd39fc
tree7780e2326ebf392028eaec0c951fc6a5e96a9fda
parent1d711627b4977ff9aef83d61c5fc0c510f561dcb
[compiler-rt][XRay] Implement __xray_unpatch() and __xray_remove_handler()

Summary:
We also add one test (and the XRay testing infrastructure) to exercise
the patching and unpatching code. This uses the XRay API exported
through the headers as well, installing a custom log handler.

Depends on D23101 for the updated emitted code alignment for the
return/entry sleds.

Reviewers: rSerge, echristo, rnk

Subscribers: tberghammer, danalbert, srhines, mehdi_amini, llvm-commits

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

llvm-svn: 277971
compiler-rt/lib/xray/xray_interface.cc
compiler-rt/test/CMakeLists.txt
compiler-rt/test/xray/CMakeLists.txt [new file with mode: 0644]
compiler-rt/test/xray/TestCases/Linux/patching-unpatching.cc [new file with mode: 0644]
compiler-rt/test/xray/lit.cfg [new file with mode: 0644]
compiler-rt/test/xray/lit.site.cfg.in [new file with mode: 0644]