Implement event notifiers for uprobes
[lttng-modules.git] / include / lttng / events.h
index ff0a48ff1f6b766054edf2b1209fe03b4271a70a..0e04b6ebd3f6e1fdc84ff6b42c9a91caafcc74fc 100644 (file)
@@ -272,6 +272,7 @@ struct lttng_enabler_ref {
 struct lttng_uprobe_handler {
        union {
                struct lttng_event *event;
+               struct lttng_event_notifier *event_notifier;
        } u;
        loff_t offset;
        struct uprobe_consumer up_consumer;
@@ -349,6 +350,7 @@ struct lttng_event_notifier {
        enum lttng_kernel_instrumentation instrumentation;
        union {
                struct lttng_kprobe kprobe;
+               struct lttng_uprobe uprobe;
        } u;
 
        /* Backward references: list of lttng_enabler_ref (ref to enablers) */
@@ -1074,6 +1076,9 @@ void lttng_kprobes_destroy_event_notifier_private(struct lttng_event_notifier *e
 int lttng_event_add_callsite(struct lttng_event *event,
        struct lttng_kernel_event_callsite *callsite);
 
+int lttng_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
+       struct lttng_kernel_event_callsite *callsite);
+
 #ifdef CONFIG_UPROBES
 int lttng_uprobes_register_event(const char *name,
        int fd, struct lttng_event *event);
@@ -1081,6 +1086,12 @@ int lttng_uprobes_event_add_callsite(struct lttng_event *event,
        struct lttng_kernel_event_callsite *callsite);
 void lttng_uprobes_unregister_event(struct lttng_event *event);
 void lttng_uprobes_destroy_event_private(struct lttng_event *event);
+int lttng_uprobes_register_event_notifier(const char *name,
+       int fd, struct lttng_event_notifier *event_notifier);
+int lttng_uprobes_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
+       struct lttng_kernel_event_callsite *callsite);
+void lttng_uprobes_unregister_event_notifier(struct lttng_event_notifier *event_notifier);
+void lttng_uprobes_destroy_event_notifier_private(struct lttng_event_notifier *event_notifier);
 #else
 static inline
 int lttng_uprobes_register_event(const char *name,
@@ -1105,6 +1116,30 @@ static inline
 void lttng_uprobes_destroy_event_private(struct lttng_event *event)
 {
 }
+
+static inline
+int lttng_uprobes_register_event_notifier(const char *name,
+       int fd, struct lttng_event_notifier *event_notifier)
+{
+       return -ENOSYS;
+}
+
+static inline
+int lttng_uprobes_event_notifier_add_callsite(struct lttng_event_notifier *event_notifier,
+       struct lttng_kernel_event_callsite *callsite)
+{
+       return -ENOSYS;
+}
+
+static inline
+void lttng_uprobes_unregister_event_notifier(struct lttng_event_notifier *event_notifier)
+{
+}
+
+static inline
+void lttng_uprobes_destroy_event_notifier_private(struct lttng_event_notifier *event_notifier)
+{
+}
 #endif
 
 #ifdef CONFIG_KRETPROBES
This page took 0.02276 seconds and 4 git commands to generate.