summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/xray/xray_interface.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/xray/xray_interface.h b/include/xray/xray_interface.h
index 680fcfdd5..9e712b1fa 100644
--- a/include/xray/xray_interface.h
+++ b/include/xray/xray_interface.h
@@ -32,6 +32,13 @@ enum XRayEntryType { ENTRY = 0, EXIT = 1, TAIL = 2 };
// (function entry, function exit, etc.). See the enum
// XRayEntryType for more details.
//
+// The user handler must handle correctly spurious calls after this handler is
+// removed or replaced with another handler, because it would be too costly for
+// XRay runtime to avoid spurious calls.
+// To prevent circular calling, the handler function itself and all its
+// direct&indirect callees must not be instrumented with XRay, which can be
+// achieved by marking them all with: __attribute__((xray_never_instrument))
+//
// Returns 1 on success, 0 on error.
extern int __xray_set_handler(void (*entry)(int32_t, XRayEntryType));