From: Mathieu Desnoyers Date: Fri, 20 May 2011 23:17:48 +0000 (-0400) Subject: Fix !CONFIG_KPROBES config X-Git-Tag: v2.0-pre1~134 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=acd614cc4d30407efd46a528e29dadb403d25ffb;p=lttng-modules.git Fix !CONFIG_KPROBES config Signed-off-by: Mathieu Desnoyers --- diff --git a/ltt-events.h b/ltt-events.h index e10c66c8..1419fb67 100644 --- a/ltt-events.h +++ b/ltt-events.h @@ -241,12 +241,28 @@ void ltt_event_put(const struct lttng_event_desc *desc); int ltt_probes_init(void); void ltt_probes_exit(void); +#ifdef CONFIG_KPROBES int lttng_kprobes_register(const char *name, const char *symbol_name, uint64_t offset, uint64_t addr, struct ltt_event *event); void lttng_kprobes_unregister(struct ltt_event *event); +#else +static inline +int lttng_kprobes_register(const char *name, + const char *symbol_name, + uint64_t offset, + uint64_t addr, + struct ltt_event *event) +{ + return -ENOSYS; +} + +void lttng_kprobes_unregister(struct ltt_event *event) +{ +} +#endif #ifdef CONFIG_DYNAMIC_FTRACE int lttng_ftrace_register(const char *name, @@ -259,7 +275,7 @@ int lttng_ftrace_register(const char *name, const char *symbol_name, struct ltt_event *event) { - return 0; + return -ENOSYS; } static inline diff --git a/probes/Makefile b/probes/Makefile index 14a7c93b..7129e979 100644 --- a/probes/Makefile +++ b/probes/Makefile @@ -16,7 +16,9 @@ obj-m += lttng-probe-irq.o obj-m += lttng-probe-block.o obj-m += lttng-probe-syscalls.o +ifneq ($(CONFIG_KPROBES),) obj-m += lttng-kprobes.o +endif ifneq ($(CONFIG_DYNAMIC_FTRACE),) obj-m += lttng-ftrace.o