summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/xray/xray_interface_internal.h
diff options
context:
space:
mode:
authorDean Michael Berris <dberris@google.com>2017-05-04 04:59:20 +0000
committerDean Michael Berris <dberris@google.com>2017-05-04 04:59:20 +0000
commit5cc4632b5bb5c63b7da8558de7d00fcc84f2f864 (patch)
treefc9f9c01d98c4a6b3f8c95b3ac444dbed4c3d779 /compiler-rt/lib/xray/xray_interface_internal.h
parentebdccd0c2d92507a6c7dadaf9830a0eae840289b (diff)
downloadbcm5719-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/lib/xray/xray_interface_internal.h')
-rw-r--r--compiler-rt/lib/xray/xray_interface_internal.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler-rt/lib/xray/xray_interface_internal.h b/compiler-rt/lib/xray/xray_interface_internal.h
index 0e3a251f3ad..ef0c6b15809 100644
--- a/compiler-rt/lib/xray/xray_interface_internal.h
+++ b/compiler-rt/lib/xray/xray_interface_internal.h
@@ -39,6 +39,11 @@ struct XRaySledEntry {
#error "Unsupported word size."
#endif
};
+
+struct XRayFunctionSledIndex {
+ const XRaySledEntry* Begin;
+ const XRaySledEntry* End;
+};
}
namespace __xray {
@@ -46,6 +51,8 @@ namespace __xray {
struct XRaySledMap {
const XRaySledEntry *Sleds;
size_t Entries;
+ const XRayFunctionSledIndex *SledsIndex;
+ size_t Functions;
};
bool patchFunctionEntry(bool Enable, uint32_t FuncId,
OpenPOWER on IntegriCloud