From: Mathieu Desnoyers Date: Fri, 10 Feb 2012 23:05:28 +0000 (-0500) Subject: Add sdt.h integration X-Git-Tag: v1.9.7~4 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b2f60c7986bb69f81b79b68f1bfe83aafa3278a7;p=lttng-ust.git Add sdt.h integration Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index e4941b5a..6ad3ef9c 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -20,6 +20,14 @@ #include /* for dlopen */ #include /* for memset */ #include +#include /* for sdt */ + +#ifdef LTTNG_UST_HAVE_SDT_INTEGRATION +#define SDT_USE_VARIADIC +#include +#else +#define STAP_PROBEV(...) +#endif #ifdef __cplusplus extern "C" { @@ -27,6 +35,7 @@ extern "C" { #define tracepoint(provider, name, ...) \ do { \ + STAP_PROBEV(provider, name ## __VA_ARGS__); \ if (caa_unlikely(__tracepoint_##provider##___##name.state)) \ __tracepoint_cb_##provider##___##name(__VA_ARGS__); \ } while (0)