Fix: Don't (re)define STAP_PROBEV
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi Stelios,
Thanks for the patch!
Look's like it's for lttng-tools. Since there is multiple projects on the ML make sure to add the project name to the patch email suffix next time.
It will ease the work of jgalar :P
For more info you can have a look at the contributor's guide here [1].
[1] https://lttng.org/community/
Cheers!
Quoted 70 lines · Stelios Bounanos
Define a new
LTTNG_STAP_PROBEVmacro to avoid clobberingSTAP_PROBEVor emitting unwanted sdt probes when lttng-ust has been built without sdt support.Signed-off-by Stelios Bounanos <[email protected]>---
Notes:
Tested by building doc/examples/hello-static-lib both --with-sdt and --without-sdt.Programs that included
sys/sdt.hafter (for example)lttng/tracef.hwould get static probes for lttng tracepoints even if lttng-ust was built without sdt support. I'm guessing that this was unintended.include/lttng/tracef.h | 2 +- include/lttng/tracelog.h | 2 +- include/lttng/tracepoint.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-)include/lttng/tracef.h +1
-1@@ -34,7 +34,7 @@ void _lttng_ust_tracef(const char *fmt, ...);#define tracef (fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ if (caa_unlikely(__tracepoint_lttng_ust_tracef___event.state)) \ _lttng_ust_tracef(fmt, ## __VA_ARGS__); \ } while (0)include/lttng/tracelog.h +1
-1@@ -53,7 +53,7 @@ TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG);#define tracelog (level, fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracelog, level, ## __VA_ARGS__); \ + LTTNG_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__); \include/lttng/tracepoint.h +3
-2@@ -37,8 +37,9 @@#ifdef LTTNG_UST_HAVE_SDT_INTEGRATION #define SDT_USE_VARIADIC #include <sys/sdt.h> +#define LTTNG_STAP_PROBEV STAP_PROBEV#else -#define STAP_PROBEV (...) +#define LTTNG_STAP_PROBEV (...)#endif #ifdef __cplusplus@@ -53,7 +54,7 @@ extern "C" {#define tracepoint (provider, name, ...) \ do { \ - STAP_PROBEV(provider, name, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(provider, name, ## __VA_ARGS__); \ if (tracepoint_enabled(provider, name)) \ do_tracepoint(provider, name, __VA_ARGS__); \ } while (0)
Signature · 2 lines
Jonathan R. Julien Efficios
A message that is not in the archive (sent off-list or not yet received): [email protected]
*Looks more like lttng-ust ... *
Quoted 91 lines · Jonathan Rajotte Julien
Hi Stelios,
Thanks for the patch!
Look's like it's for lttng-tools. Since there is multiple projects on the ML make sure to add the project name to the patch email suffix next time.
It will ease the work of jgalar :P
For more info you can have a look at the contributor's guide here [1].
[1] https://lttng.org/community/
Cheers!
Quoted 74 lines · Stelios Bounanos
Define a new
LTTNG_STAP_PROBEVmacro to avoid clobberingSTAP_PROBEVor emitting unwanted sdt probes when lttng-ust has been built without sdt support.Signed-off-by Stelios Bounanos <[email protected]>---
Notes:
Tested by building doc/examples/hello-static-lib both --with-sdtand
--without-sdt.
Programs that includedsys/sdt.hafter (for example)lttng/tracef.h
would get static probes for lttng tracepoints even if lttng-ust was built without sdt support. I'm guessing that this was unintended.include/lttng/tracef.h | 2 +- include/lttng/tracelog.h | 2 +- include/lttng/tracepoint.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-)include/lttng/tracef.h +1
-1@@ -34,7 +34,7 @@ void _lttng_ust_tracef(const char *fmt, ...);#define tracef (fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \if (caa_unlikely (__tracepoint_lttng_ust_tracef___event.state)) \_lttng_ust_tracef(fmt, ## __VA_ARGS__); \ } while (0)include/lttng/tracelog.h +1
-1@@ -53,7 +53,7 @@ TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG);#define tracelog (level, fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracelog, level, ## __VA_ARGS__); \ + LTTNG_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__); \include/lttng/tracepoint.h +3
-2@@ -37,8 +37,9 @@#ifdef LTTNG_UST_HAVE_SDT_INTEGRATION #define SDT_USE_VARIADIC #include <sys/sdt.h> +#define LTTNG_STAP_PROBEV STAP_PROBEV#else -#define STAP_PROBEV (...) +#define LTTNG_STAP_PROBEV (...)#endif #ifdef __cplusplus@@ -53,7 +54,7 @@ extern "C" {#define tracepoint (provider, name, ...) \ do { \ - STAP_PROBEV(provider, name, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(provider, name, ## __VA_ARGS__); \ if (tracepoint_enabled(provider, name)) \ do_tracepoint(provider, name, __VA_ARGS__); \ } while (0)
Signature · 2 lines
Jonathan R. Julien Efficios
Mathieu Desnoyers
AppliedMerged into lttng-ust master, stable-2.7 and stable-2.6, thanks!
Mathieu
Quoted 78 lines · ----- On Oct 14, 2015, at 12:31 PM, Stelios Bounanos [email protected] wrote:
Define a new
LTTNG_STAP_PROBEVmacro to avoid clobberingSTAP_PROBEVor emitting unwanted sdt probes when lttng-ust has been built without sdt support.Signed-off-by Stelios Bounanos <[email protected]>---
Notes:
Tested by building doc/examples/hello-static-lib both --with-sdt and --without-sdt.Programs that included
sys/sdt.hafter (for example)lttng/tracef.hwould get static probes for lttng tracepoints even if lttng-ust was built without sdt support. I'm guessing that this was unintended.include/lttng/tracef.h | 2 +- include/lttng/tracelog.h | 2 +- include/lttng/tracepoint.h | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-)include/lttng/tracef.h +1
-1@@ -34,7 +34,7 @@ void _lttng_ust_tracef(const char *fmt, ...);#define tracef (fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ if (caa_unlikely(__tracepoint_lttng_ust_tracef___event.state)) \ _lttng_ust_tracef(fmt, ## __VA_ARGS__); \ } while (0)include/lttng/tracelog.h +1
-1@@ -53,7 +53,7 @@ TP_TRACELOG_CB_TEMPLATE(TRACE_DEBUG);#define tracelog (level, fmt, ...) \ do { \ - STAP_PROBEV(tracepoint_lttng_ust_tracelog, level, ## __VA_ARGS__); \ + LTTNG_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__); \include/lttng/tracepoint.h +3
-3@@ -37,8 +37,9 @@#ifdef LTTNG_UST_HAVE_SDT_INTEGRATION #define SDT_USE_VARIADIC #include <sys/sdt.h> +#define LTTNG_STAP_PROBEV STAP_PROBEV#else -#define STAP_PROBEV (...) +#define LTTNG_STAP_PROBEV (...)#endif #ifdef __cplusplus@@ -53,7 +54,7 @@ extern "C" {#define tracepoint (provider, name, ...) \ do { \ - STAP_PROBEV(provider, name, ## __VA_ARGS__); \ + LTTNG_STAP_PROBEV(provider, name, ## __VA_ARGS__); \ if (tracepoint_enabled(provider, name)) \ do_tracepoint(provider, name, __VA_ARGS__); \ } while (0) --2.6.1
_______________________________________________
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