From e33fc900491443368c1e8ed3486026fbb1305006 Mon Sep 17 00:00:00 2001 From: Francis Deslauriers Date: Wed, 29 Aug 2018 11:45:49 -0400 Subject: [PATCH] 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 --- Makefile | 3 +-- lttng-events.h | 3 ++- probes/Kbuild | 4 ++++ 3 files changed, 7 insertions(+), 3 deletions(-) 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 -- 2.34.1