Fix !CONFIG_KPROBES config
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 20 May 2011 23:17:48 +0000 (19:17 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 20 May 2011 23:17:48 +0000 (19:17 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
ltt-events.h
probes/Makefile

index e10c66c8f2d92460b8e3684107554e68a9486995..1419fb67219e047c6125ebf9af4183a7c8bc0a51 100644 (file)
@@ -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
index 14a7c93bc3c867a361aae0d10a3711d36ae10b18..7129e979e28fe8678123ffcc3285730c0c9c47a3 100644 (file)
@@ -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
This page took 0.02685 seconds and 4 git commands to generate.