All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] Fix: Don't (re)define STAP_PROBEV
       [not found] <871tcx5s47.wl-sb@enotty.net>
@ 2015-10-14 17:29 ` Jonathan Rajotte Julien
       [not found] ` <561E9114.1040705@efficios.com>
  2015-10-15 21:16 ` Mathieu Desnoyers
  2 siblings, 0 replies; 4+ messages in thread
From: Jonathan Rajotte Julien @ 2015-10-14 17:29 UTC (permalink / raw)
  To: lttng-dev

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!

On 2015-10-14 12:31 PM, Stelios Bounanos wrote:
> Define a new LTTNG_STAP_PROBEV macro to avoid clobbering STAP_PROBEV or
> emitting unwanted sdt probes when lttng-ust has been built without sdt
> support.
>
> Signed-off-by: Stelios Bounanos <sb@enotty.net>
> ---
>
> Notes:
>      Tested by building doc/examples/hello-static-lib both --with-sdt and
>      --without-sdt.
>      
>      Programs that included sys/sdt.h after (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(-)
>
> diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h
> index 7e8b59e..0c59c9a 100644
> --- a/include/lttng/tracef.h
> +++ b/include/lttng/tracef.h
> @@ -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)
> diff --git a/include/lttng/tracelog.h b/include/lttng/tracelog.h
> index 5f14f70..4309d12 100644
> --- a/include/lttng/tracelog.h
> +++ b/include/lttng/tracelog.h
> @@ -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__); \
> diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h
> index 4bc4fc9..e88db89 100644
> --- a/include/lttng/tracepoint.h
> +++ b/include/lttng/tracepoint.h
> @@ -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)

-- 
Jonathan R. Julien
Efficios

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix: Don't (re)define STAP_PROBEV
       [not found] ` <561E9114.1040705@efficios.com>
@ 2015-10-14 17:33   ` Jonathan Rajotte Julien
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Rajotte Julien @ 2015-10-14 17:33 UTC (permalink / raw)
  To: lttng-dev

*Looks more like lttng-ust ... *

On 2015-10-14 01:29 PM, Jonathan Rajotte Julien wrote:
> 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!
>
> On 2015-10-14 12:31 PM, Stelios Bounanos wrote:
>> Define a new LTTNG_STAP_PROBEV macro to avoid clobbering STAP_PROBEV or
>> emitting unwanted sdt probes when lttng-ust has been built without sdt
>> support.
>>
>> Signed-off-by: Stelios Bounanos <sb@enotty.net>
>> ---
>>
>> Notes:
>>      Tested by building doc/examples/hello-static-lib both --with-sdt 
>> and
>>      --without-sdt.
>>           Programs that included sys/sdt.h after (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(-)
>>
>> diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h
>> index 7e8b59e..0c59c9a 100644
>> --- a/include/lttng/tracef.h
>> +++ b/include/lttng/tracef.h
>> @@ -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)
>> diff --git a/include/lttng/tracelog.h b/include/lttng/tracelog.h
>> index 5f14f70..4309d12 100644
>> --- a/include/lttng/tracelog.h
>> +++ b/include/lttng/tracelog.h
>> @@ -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__); \
>> diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h
>> index 4bc4fc9..e88db89 100644
>> --- a/include/lttng/tracepoint.h
>> +++ b/include/lttng/tracepoint.h
>> @@ -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)
>

-- 
Jonathan R. Julien
Efficios

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Fix: Don't (re)define STAP_PROBEV
       [not found] <871tcx5s47.wl-sb@enotty.net>
  2015-10-14 17:29 ` [PATCH] Fix: Don't (re)define STAP_PROBEV Jonathan Rajotte Julien
       [not found] ` <561E9114.1040705@efficios.com>
@ 2015-10-15 21:16 ` Mathieu Desnoyers
  2 siblings, 0 replies; 4+ messages in thread
From: Mathieu Desnoyers @ 2015-10-15 21:16 UTC (permalink / raw)
  To: Stelios Bounanos; +Cc: lttng-dev

Merged into lttng-ust master, stable-2.7 and stable-2.6, thanks!

Mathieu

----- On Oct 14, 2015, at 12:31 PM, Stelios Bounanos sb@enotty.net wrote:

> Define a new LTTNG_STAP_PROBEV macro to avoid clobbering STAP_PROBEV or
> emitting unwanted sdt probes when lttng-ust has been built without sdt
> support.
> 
> Signed-off-by: Stelios Bounanos <sb@enotty.net>
> ---
> 
> Notes:
>    Tested by building doc/examples/hello-static-lib both --with-sdt and
>    --without-sdt.
>    
>    Programs that included sys/sdt.h after (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(-)
> 
> diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h
> index 7e8b59e..0c59c9a 100644
> --- a/include/lttng/tracef.h
> +++ b/include/lttng/tracef.h
> @@ -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)
> diff --git a/include/lttng/tracelog.h b/include/lttng/tracelog.h
> index 5f14f70..4309d12 100644
> --- a/include/lttng/tracelog.h
> +++ b/include/lttng/tracelog.h
> @@ -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__); \
> diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h
> index 4bc4fc9..e88db89 100644
> --- a/include/lttng/tracepoint.h
> +++ b/include/lttng/tracepoint.h
> @@ -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
> lttng-dev@lists.lttng.org
> http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] Fix: Don't (re)define STAP_PROBEV
@ 2015-10-14 16:31 Stelios Bounanos
  0 siblings, 0 replies; 4+ messages in thread
From: Stelios Bounanos @ 2015-10-14 16:31 UTC (permalink / raw)
  To: lttng-dev

Define a new LTTNG_STAP_PROBEV macro to avoid clobbering STAP_PROBEV or
emitting unwanted sdt probes when lttng-ust has been built without sdt
support.

Signed-off-by: Stelios Bounanos <sb@enotty.net>
---

Notes:
    Tested by building doc/examples/hello-static-lib both --with-sdt and
    --without-sdt.
    
    Programs that included sys/sdt.h after (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(-)

diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h
index 7e8b59e..0c59c9a 100644
--- a/include/lttng/tracef.h
+++ b/include/lttng/tracef.h
@@ -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)
diff --git a/include/lttng/tracelog.h b/include/lttng/tracelog.h
index 5f14f70..4309d12 100644
--- a/include/lttng/tracelog.h
+++ b/include/lttng/tracelog.h
@@ -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__); \
diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h
index 4bc4fc9..e88db89 100644
--- a/include/lttng/tracepoint.h
+++ b/include/lttng/tracepoint.h
@@ -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

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-10-15 21:16 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <871tcx5s47.wl-sb@enotty.net>
2015-10-14 17:29 ` [PATCH] Fix: Don't (re)define STAP_PROBEV Jonathan Rajotte Julien
     [not found] ` <561E9114.1040705@efficios.com>
2015-10-14 17:33   ` Jonathan Rajotte Julien
2015-10-15 21:16 ` Mathieu Desnoyers
2015-10-14 16:31 Stelios Bounanos

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.