X-Git-Url: http://git.lttng.org/?p=lttng-modules.git;a=blobdiff_plain;f=include%2Flttng%2Fevents.h;h=0e04b6ebd3f6e1fdc84ff6b42c9a91caafcc74fc;hp=ff0a48ff1f6b766054edf2b1209fe03b4271a70a;hb=9de67196ec41ae39fd73e49259da50119c21bfcc;hpb=83b802dc7f83a776bc9aea34562ab591ba7a65ee diff --git a/include/lttng/events.h b/include/lttng/events.h index ff0a48ff..0e04b6eb 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -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