Fix: ust-tracepoint: make sure to expand tracepoint provider token
authorChristophe Bedard <bedard.christophe@gmail.com>
Sun, 21 Jun 2020 17:54:30 +0000 (13:54 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 10 Dec 2020 14:02:51 +0000 (09:02 -0500)
commitf8021d088ed27ede5af620702468a8cf4647b7fc
tree2da67a6d4d34cd0b9dabe5cd716d26aa44b0b527
parent33f43caa08bc332900bc8671a156912a09e88aa2
Fix: ust-tracepoint: make sure to expand tracepoint provider token

Using a #defined TRACEPOINT_PROVIDER with the
TRACEPOINT_EVENT_{CLASS,INSTANCE}() macros led to compilation errors,
e.g.:

gcc -I/home/chris/lttng-mwe/app/../lib -c myapp.c
gcc -o myapp myapp.o -L/home/chris/lttng-mwe/app/../lib -Wl,-rpath=/home/chris/lttng-mwe/app/../lib -lmytps -ldl
/usr/bin/ld: /home/chris/lttng-mwe/app/../lib/libmytps.so: undefined reference to `__tracepoint_provider_mismatch_TRACEPOINT_PROVIDER'
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: myapp] Error 1

Use intermediate TRACEPOINT_EVENT_{CLASS,INSTANCE}() macros to make sure
that the tracepoint provider name token gets expanded.

[ Mathieu: Adapt event notifier probes as well. ]

Fixes: #1273
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I68550a510c809f1d5f86a7e1d966dcecc3780dda
include/lttng/ust-tracepoint-event-reset.h
include/lttng/ust-tracepoint-event.h
This page took 0.025095 seconds and 4 git commands to generate.