X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=include%2Flttng%2Fevents.h;h=0e04b6ebd3f6e1fdc84ff6b42c9a91caafcc74fc;hb=9de67196ec41ae39fd73e49259da50119c21bfcc;hp=cf04a30585dc3f0839e1dd9937f672f9477c5893;hpb=2b16f0c9dfdc1b1a593c5ed58fd08a89e18eccae;p=lttng-modules.git diff --git a/include/lttng/events.h b/include/lttng/events.h index cf04a305..0e04b6eb 100644 --- a/include/lttng/events.h +++ b/include/lttng/events.h @@ -270,7 +270,10 @@ struct lttng_enabler_ref { }; struct lttng_uprobe_handler { - struct lttng_event *event; + union { + struct lttng_event *event; + struct lttng_event_notifier *event_notifier; + } u; loff_t offset; struct uprobe_consumer up_consumer; struct list_head node; @@ -281,6 +284,11 @@ struct lttng_kprobe { char *symbol_name; }; +struct lttng_uprobe { + struct inode *inode; + struct list_head head; +}; + enum lttng_syscall_entryexit { LTTNG_SYSCALL_ENTRY, LTTNG_SYSCALL_EXIT, @@ -310,10 +318,7 @@ struct lttng_event { struct lttng_krp *lttng_krp; char *symbol_name; } kretprobe; - struct { - struct inode *inode; - struct list_head head; - } uprobe; + struct lttng_uprobe uprobe; struct { char *syscall_name; enum lttng_syscall_entryexit entryexit; @@ -345,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) */ @@ -1070,35 +1076,68 @@ 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(const char *name, +int lttng_uprobes_register_event(const char *name, int fd, struct lttng_event *event); -int lttng_uprobes_add_callsite(struct lttng_event *event, +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(struct lttng_event *event); -void lttng_uprobes_destroy_private(struct lttng_event *event); +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(const char *name, +int lttng_uprobes_register_event(const char *name, int fd, struct lttng_event *event) { return -ENOSYS; } static inline -int lttng_uprobes_add_callsite(struct lttng_event *event, +int lttng_uprobes_event_add_callsite(struct lttng_event *event, + struct lttng_kernel_event_callsite *callsite) +{ + return -ENOSYS; +} + +static inline +void lttng_uprobes_unregister_event(struct lttng_event *event) +{ +} + +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(struct lttng_event *event) +void lttng_uprobes_unregister_event_notifier(struct lttng_event_notifier *event_notifier) { } static inline -void lttng_uprobes_destroy_private(struct lttng_event *event) +void lttng_uprobes_destroy_event_notifier_private(struct lttng_event_notifier *event_notifier) { } #endif