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 | 5cc4632b5bb5c63b7da8558de7d00fcc84f2f864 (patch) | |
| tree | fc9f9c01d98c4a6b3f8c95b3ac444dbed4c3d779 /compiler-rt/include/xray | |
| parent | ebdccd0c2d92507a6c7dadaf9830a0eae840289b (diff) | |
| download | bcm5719-llvm-5cc4632b5bb5c63b7da8558de7d00fcc84f2f864.tar.gz bcm5719-llvm-5cc4632b5bb5c63b7da8558de7d00fcc84f2f864.zip | |
[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
llvm-svn: 302112
Diffstat (limited to 'compiler-rt/include/xray')
| -rw-r--r-- | compiler-rt/include/xray/xray_interface.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler-rt/include/xray/xray_interface.h b/compiler-rt/include/xray/xray_interface.h index 52a7e1d9e94..e2d0a89d67b 100644 --- a/compiler-rt/include/xray/xray_interface.h +++ b/compiler-rt/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). |

