From b2f60c7986bb69f81b79b68f1bfe83aafa3278a7 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Fri, 10 Feb 2012 18:05:28 -0500 Subject: [PATCH] Add sdt.h integration Signed-off-by: Mathieu Desnoyers --- include/lttng/tracepoint.h | 9 +++++++++ 1 file changed, 9 insertions(+) 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) -- 2.34.1