X-Git-Url: http://git.lttng.org./?a=blobdiff_plain;f=include%2Flttng%2Ftracelog.h;h=d5fd93694b4980c5953909dfce16ed9681aad437;hb=81b16412749579b79a4d829ff87e170d0e1ebd0d;hp=743b6824a0fb2355a7e32a29bd032aff83d91360;hpb=c0c0989ab70574e09b2f7e8b48c2da6af664a849;p=lttng-ust.git diff --git a/include/lttng/tracelog.h b/include/lttng/tracelog.h index 743b6824..d5fd9369 100644 --- a/include/lttng/tracelog.h +++ b/include/lttng/tracelog.h @@ -7,7 +7,7 @@ #ifndef _LTTNG_UST_TRACELOG_H #define _LTTNG_UST_TRACELOG_H -#include +#include #ifdef __cplusplus extern "C" { @@ -15,9 +15,13 @@ extern "C" { #define TP_TRACELOG_CB_TEMPLATE(level) \ extern void _lttng_ust_tracelog_##level(const char *file, \ - int line, const char *func, const char *fmt, ...); \ + int line, const char *func, const char *fmt, ...) \ + __attribute__ ((format(printf, 4, 5))); \ + \ extern void _lttng_ust_vtracelog_##level(const char *file, \ - int line, const char *func, const char *fmt, va_list ap); + int line, const char *func, const char *fmt, \ + va_list ap) \ + __attribute__ ((format(printf, 4, 0))); TP_TRACELOG_CB_TEMPLATE(TRACE_EMERG); TP_TRACELOG_CB_TEMPLATE(TRACE_ALERT); @@ -39,7 +43,7 @@ TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG); #define tracelog(level, fmt, ...) \ do { \ - LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracelog, level, ## __VA_ARGS__); \ + LTTNG_UST_STAP_PROBEV(tracepoint_lttng_ust_tracelog, level, ## __VA_ARGS__); \ if (caa_unlikely(__tracepoint_lttng_ust_tracelog___##level.state)) \ _lttng_ust_tracelog_##level(__FILE__, __LINE__, __func__, \ fmt, ## __VA_ARGS__); \