Fix: build failures when CONFIG_UPROBES is absent
authorFrancis Deslauriers <francis.deslauriers@efficios.com>
Wed, 29 Aug 2018 15:45:49 +0000 (11:45 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 30 Aug 2018 00:30:10 +0000 (20:30 -0400)
Problems
========
- There is a typo in the struct name of the parameters of stub version
  of the lttng_uprobes_add_callsite function,
- We are building the lttng-uprobes.o object file even when
  CONFIG_UPROBES is absent.

Both of these are causing build errors.

Fixes
=====
- Replace struct lttng_kernel_callsite_uprobe by struct
  lttng_kernel_event_callsite,
- Only add the lttng-uprobes.o object file to the needed artefacts if
  CONFIG_UPROBES is present.

Signed-off-by: Francis Deslauriers <francis.deslauriers@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Makefile
lttng-events.h
probes/Kbuild

index 463b3141e7911675232c6fbdf1aaf80d0f0aee26..ae2b19538c1a52f1ec942656f86077cb76e95aa4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -59,8 +59,7 @@ ifneq ($(KERNELRELEASE),)
                        lttng-filter-specialize.o \
                        lttng-filter-validator.o \
                        probes/lttng-probe-user.o \
-                       lttng-tp-mempool.o \
-                       probes/lttng-uprobes.o
+                       lttng-tp-mempool.o
 
   ifneq ($(CONFIG_HAVE_SYSCALL_TRACEPOINTS),)
     lttng-tracer-objs += lttng-syscalls.o
index f74f9d52cccb81302b18c242712cb2941009a4e1..f5a7d23dd7b89b40320281975fe656ceba78fd47 100644 (file)
@@ -785,6 +785,7 @@ void lttng_kprobes_destroy_private(struct lttng_event *event)
 
 int lttng_event_add_callsite(struct lttng_event *event,
        struct lttng_kernel_event_callsite *callsite);
+
 #ifdef CONFIG_UPROBES
 int lttng_uprobes_register(const char *name,
        int fd, struct lttng_event *event);
@@ -802,7 +803,7 @@ int lttng_uprobes_register(const char *name,
 
 static inline
 int lttng_uprobes_add_callsite(struct lttng_event *event,
-       struct lttng_kernel_callsite_uprobe *callsite)
+       struct lttng_kernel_event_callsite *callsite)
 {
        return -ENOSYS;
 }
index eb6ded937286021dfb4199950b49aeef4aa3e003..0b1e016f32b0822046674a25ba9d489508a23b95 100644 (file)
@@ -263,6 +263,10 @@ ifneq ($(CONFIG_KPROBES),)
   obj-$(CONFIG_LTTNG) += lttng-kprobes.o
 endif # CONFIG_KPROBES
 
+ifneq ($(CONFIG_UPROBES),)
+  obj-$(CONFIG_LTTNG) += lttng-uprobes.o
+endif # CONFIG_UPROBES
+
 ifneq ($(CONFIG_KRETPROBES),)
   obj-$(CONFIG_LTTNG) += lttng-kretprobes.o
 endif # CONFIG_KRETPROBES
This page took 0.027516 seconds and 4 git commands to generate.