X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=ltt-events.h;h=6cc4ea3f6fed01bbcc9309dbfcdfbfb33400a21e;hb=7371f44c2c8ea6e60c0457671af008dd018c0b5f;hp=31a50ca5f34968d0705e22885d30d54289d0db51;hpb=9fe47d1849406a219578176753b763998dc7fad1;p=lttng-modules.git diff --git a/ltt-events.h b/ltt-events.h index 31a50ca5..6cc4ea3f 100644 --- a/ltt-events.h +++ b/ltt-events.h @@ -163,6 +163,8 @@ struct lttng_probe_desc { struct list_head head; /* chain registered probes */ }; +struct lttng_krp; /* Kretprobe handling */ + /* * ltt_event structure is referred to by the tracing fast path. It must be * kept small. @@ -180,6 +182,10 @@ struct ltt_event { struct kprobe kp; char *symbol_name; } kprobe; + struct { + struct lttng_krp *lttng_krp; + char *symbol_name; + } kretprobe; struct { char *symbol_name; } ftrace; @@ -351,6 +357,38 @@ void lttng_kprobes_destroy_private(struct ltt_event *event) } #endif +#ifdef CONFIG_KRETPROBES +int lttng_kretprobes_register(const char *name, + const char *symbol_name, + uint64_t offset, + uint64_t addr, + struct ltt_event *event_entry, + struct ltt_event *event_exit); +void lttng_kretprobes_unregister(struct ltt_event *event); +void lttng_kretprobes_destroy_private(struct ltt_event *event); +#else +static inline +int lttng_kretprobes_register(const char *name, + const char *symbol_name, + uint64_t offset, + uint64_t addr, + struct ltt_event *event_entry, + struct ltt_event *event_exit) +{ + return -ENOSYS; +} + +static inline +void lttng_kretprobes_unregister(struct ltt_event *event) +{ +} + +static inline +void lttng_kretprobes_destroy_private(struct ltt_event *event) +{ +} +#endif + #ifdef CONFIG_DYNAMIC_FTRACE int lttng_ftrace_register(const char *name, const char *symbol_name,