diff options
author | Dean Michael Berris <dberris@google.com> | 2017-05-04 04:59:20 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2017-05-04 04:59:20 +0000 |
commit | be190670452d24c95b99fc32a42357e5cfced738 (patch) | |
tree | f280f7243f8408a72f2afed25befe6be4f001ba1 /include | |
parent | 72830dd7ffe3932beb5f5fbe29d84105b7df3f8a (diff) |
[XRay][compiler-rt] Support patching/unpatching specific functions
Summary:
This change allows us to patch/unpatch specific functions using the
function ID. This is useful in cases where implementations might want to
do coverage-style, or more fine-grained control of which functions to
patch or un-patch at runtime.
Depends on D32693.
Reviewers: dblaikie, echristo, kpw
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D32695
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302112 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/xray/xray_interface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/xray/xray_interface.h b/include/xray/xray_interface.h index 52a7e1d9e..e2d0a89d6 100644 --- a/include/xray/xray_interface.h +++ b/include/xray/xray_interface.h @@ -67,6 +67,14 @@ extern XRayPatchingStatus __xray_patch(); // result values. extern XRayPatchingStatus __xray_unpatch(); +// This patches a specific function id. See XRayPatchingStatus for possible +// result values. +extern XRayPatchingStatus __xray_patch_function(int32_t FuncId); + +// This unpatches a specific function id. See XRayPatchingStatus for possible +// result values. +extern XRayPatchingStatus __xray_unpatch_function(int32_t FuncId); + // Use XRay to log the first argument of each (instrumented) function call. // When this function exits, all threads will have observed the effect and // start logging their subsequent affected function calls (if patched). |