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:04:25 +0000 (09:04 -0500)
commit5a6a15d886fa7fc6cd9e10b849a73d52516f8e00
treecb96087d38de9a98bc7d3cafecb19bf3029b494b
parentbad4193f74cf859d341197a28be40f143ab178c1
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.025737 seconds and 4 git commands to generate.