Skip to contentSkip to conversation

Using tracepoint call inside a macro

DISCUSSION Mathieu Desnoyers 1 participant 1 message May 15, 2015 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

----- Original Message -----

Quoted 12 lines

Hi all,

I wonder if it is possible to define a macro containing a tracepoint (which is also a macro) call.

As a very simple example, using :

#define TRACE(subsystem, tracepoint, params...) tracepoint(subsystem, tracepoint, params)

TRACE(provider, tp1, arg);

Quoted 8 lines

is not compiling (tracepoint macro seems not to be expanded), whereas direct call

tracepoint(provider, tp1, arg);

is compiling.

Any idea ?

Try renaming your TRACE() argument "tracepoint" to something else, e.g. "_tracepoint", so it does not clash with the "tracepoint" macro name.

Thanks,

Mathieu

Quoted 11 lines

BR
Franck

_______________________________________________
lttng-dev mailing list
[email protected]
http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com