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:06:41 +0000 (09:06 -0500)
commit59477abddec4e881a3f55230c9949c604b5e0ce3
tree57ee51b0a7075041a2457c9b879c82cd9f7d2260
parent2886e469e7aa7ff212a2777f268f056df85fd356
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.

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.026412 seconds and 4 git commands to generate.