Tracepoint API namespacing 'TP_SESSION_CHECK'
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 20 Apr 2021 20:50:17 +0000 (16:50 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 22 Apr 2021 15:01:18 +0000 (11:01 -0400)
The ABI bump gives us the opportunity to namespace all public symbols
under the 'lttng_ust_' prefix. Namespace all API symbols and macros
under 'lttng_ust_' / 'LTTNG_UST_' and add compat macros to keep
compatibility with the previous API.

Change-Id: I7c68548f40594250ba10defcdd0775cdb1a3172e
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint-event.h
include/lttng/ust-tracepoint-event.h
src/lib/lttng-ust/lttng-ust-statedump.c

index 4044339d255e421aa2d8d9d1d2a7687b16856b5d..0bbecce84e4adaed6b683c805c5074f25f258933 100644 (file)
 # endif
 #endif /* #if LTTNG_UST_COMPAT_API(0) */
 
+#if LTTNG_UST_COMPAT_API(0)
+# if defined(TP_SESSION_CHECK) && !defined(LTTNG_UST_TP_SESSION_CHECK)
+#  define LTTNG_UST_TP_SESSION_CHECK
+# endif
+#endif /* #if LTTNG_UST_COMPAT_API(0) */
+
 #include LTTNG_UST_TRACEPOINT_INCLUDE
 
 #include <lttng/ust-tracepoint-event.h>
index 47e773798a894667224275d4413943f3b0eba9cb..bf7c8377451f8fc054168e36cc9c53aff9541e45 100644 (file)
@@ -803,11 +803,11 @@ size_t lttng_ust__event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_PR
  * session this event belongs to. Ensures that we write state dump data only
  * into the started session, not into all sessions.
  */
-#undef _TP_SESSION_CHECK
-#ifdef TP_SESSION_CHECK
-#define _TP_SESSION_CHECK(session, csession)   (session == csession)
+#undef LTTNG_UST__TP_SESSION_CHECK
+#ifdef LTTNG_UST_TP_SESSION_CHECK
+#define LTTNG_UST__TP_SESSION_CHECK(session, csession)   (session == csession)
 #else /* TP_SESSION_CHECK */
-#define _TP_SESSION_CHECK(session, csession)   1
+#define LTTNG_UST__TP_SESSION_CHECK(session, csession)   1
 #endif /* TP_SESSION_CHECK */
 
 /*
@@ -863,7 +863,7 @@ void lttng_ust__event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_DATA_PRO
                struct lttng_ust_channel_buffer *__chan = lttng_ust__event_recorder->chan; \
                struct lttng_ust_channel_common *__chan_common = __chan->parent; \
                                                                              \
-               if (!_TP_SESSION_CHECK(session, __chan_common->session))      \
+               if (!LTTNG_UST__TP_SESSION_CHECK(session, __chan_common->session))      \
                        return;                                               \
                if (caa_unlikely(!CMM_ACCESS_ONCE(__chan_common->session->active))) \
                        return;                                               \
index 62a94291edf797df272301c8a389b1afd792025f..3c286c86bbd32f70839438d2bb33a15e29471e2a 100644 (file)
@@ -28,7 +28,7 @@
 #include "ust_lib.h"                           /* Only define. */
 
 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
-#define TP_SESSION_CHECK
+#define LTTNG_UST_TP_SESSION_CHECK
 #include "lttng-ust-statedump-provider.h"      /* Define and create probes. */
 
 struct dl_iterate_data {
This page took 0.026289 seconds and 4 git commands to generate.