diff options
author | Dean Michael Berris <dberris@google.com> | 2017-05-12 01:07:41 +0000 |
---|---|---|
committer | Dean Michael Berris <dberris@google.com> | 2017-05-12 01:07:41 +0000 |
commit | f9947480f58b10f2460df24287f95357082b6563 (patch) | |
tree | d9b7f4f86d716227a89c4a94bb3cc1e79af3559e /include | |
parent | a5c91c22f175eddf6f2d4d244dce6ce6a2e3c9e1 (diff) |
[XRay][compiler-rt] Runtime changes to support custom event logging
Summary:
This change implements support for the custom event logging sleds and
intrinsics at runtime. For now it only supports handling the sleds in
x86_64, with the implementations for other architectures stubbed out to
do nothing.
NOTE: Work in progress, uploaded for exposition/exploration purposes.
Depends on D27503, D30018, and D33032.
Reviewers: echristo, javed.absar, timshen
Subscribers: mehdi_amini, nemanjai, llvm-commits
Differential Revision: https://reviews.llvm.org/D30630
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@302857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/xray/xray_interface.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/xray/xray_interface.h b/include/xray/xray_interface.h index c90025e38..aea43517d 100644 --- a/include/xray/xray_interface.h +++ b/include/xray/xray_interface.h @@ -25,6 +25,7 @@ enum XRayEntryType { EXIT = 1, TAIL = 2, LOG_ARGS_ENTRY = 3, + CUSTOM_EVENT = 4, }; /// Provide a function to invoke for when instrumentation points are hit. This @@ -64,6 +65,9 @@ extern int __xray_set_handler_arg1(void (*)(int32_t, XRayEntryType, uint64_t)); /// Returns 1 on success, 0 on error. extern int __xray_remove_handler_arg1(); +/// Provide a function to invoke when XRay encounters a custom event. +extern int __xray_set_customevent_handler(void (*entry)(void*, std::size_t)); + enum XRayPatchingStatus { NOT_INITIALIZED = 0, SUCCESS = 1, |