From: Francis Deslauriers Date: Wed, 29 Aug 2018 15:45:49 +0000 (-0400) Subject: Fix: build failures when CONFIG_UPROBES is absent X-Git-Tag: v2.11.0-rc1~4 X-Git-Url: http://git.liburcu.org/?p=lttng-modules.git;a=commitdiff_plain;h=e33fc900491443368c1e8ed3486026fbb1305006 Fix: build failures when CONFIG_UPROBES is absent 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 Signed-off-by: Mathieu Desnoyers --- diff --git a/Makefile b/Makefile index 463b3141..ae2b1953 100644 --- 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 diff --git a/lttng-events.h b/lttng-events.h index f74f9d52..f5a7d23d 100644 --- a/lttng-events.h +++ b/lttng-events.h @@ -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; } diff --git a/probes/Kbuild b/probes/Kbuild index eb6ded93..0b1e016f 100644 --- a/probes/Kbuild +++ b/probes/Kbuild @@ -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