Tracepoint API namespacing 'TP_IP_PARAM'
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 20 Apr 2021 20:57:45 +0000 (16:57 -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: Ie01946b463b9b7a517699b3d7063ef97da134a43
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-cyg-profile/lttng-ust-cyg-profile-fast.c
src/lib/lttng-ust-cyg-profile/lttng-ust-cyg-profile.c
src/lib/lttng-ust-dl/ust_dl.c
src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c
src/lib/lttng-ust-pthread-wrapper/lttng-ust-pthread.c
src/lib/lttng-ust/lttng-ust-tracef-provider.h
src/lib/lttng-ust/lttng-ust-tracelog-provider.h
src/lib/lttng-ust/ust_lib.c

index 0bbecce84e4adaed6b683c805c5074f25f258933..24b387d30b8d32b185231854a1fe4a3b1f3e8071 100644 (file)
 # endif
 #endif /* #if LTTNG_UST_COMPAT_API(0) */
 
+#if LTTNG_UST_COMPAT_API(0)
+# if defined(TP_IP_PARAM) && !defined(LTTNG_UST_TP_IP_PARAM)
+#  define LTTNG_UST_TP_IP_PARAM
+# endif
+#endif /* #if LTTNG_UST_COMPAT_API(0) */
+
 #include LTTNG_UST_TRACEPOINT_INCLUDE
 
 #include <lttng/ust-tracepoint-event.h>
index bf7c8377451f8fc054168e36cc9c53aff9541e45..0df951a4655f23d1ac79d9b86589ddf58a06d550 100644 (file)
@@ -816,15 +816,16 @@ size_t lttng_ust__event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_PR
  * architecture for now by always using the NULL value for the ip
  * context.
  */
-#undef _TP_IP_PARAM
-#ifdef TP_IP_PARAM
-#define _TP_IP_PARAM(x)                (x)
+#undef LTTNG_UST__TP_IP_PARAM
+
+#ifdef LTTNG_UST_TP_IP_PARAM
+#define LTTNG_UST__TP_IP_PARAM(x)              (x)
 #else /* TP_IP_PARAM */
 
 #if defined(LTTNG_UST_ARCH_PPC) && !defined(LTTNG_UST_ARCH_PPC64)
-#define _TP_IP_PARAM(x)                NULL
+#define LTTNG_UST__TP_IP_PARAM(x)              NULL
 #else
-#define _TP_IP_PARAM(x)                __builtin_return_address(0)
+#define LTTNG_UST__TP_IP_PARAM(x)              __builtin_return_address(0)
 #endif
 
 #endif /* TP_IP_PARAM */
@@ -898,7 +899,7 @@ void lttng_ust__event_probe__##_provider##___##_name(LTTNG_UST__TP_ARGS_DATA_PRO
                         LTTNG_UST__TP_ARGS_DATA_VAR(_args));                         \
                lttng_ust__event_align = lttng_ust__event_get_align__##_provider##___##_name(LTTNG_UST__TP_ARGS_VAR(_args)); \
                lttng_ust_ring_buffer_ctx_init(&__ctx, lttng_ust__event_recorder, __event_len, lttng_ust__event_align, \
-                               _TP_IP_PARAM(TP_IP_PARAM));                   \
+                               LTTNG_UST__TP_IP_PARAM(LTTNG_UST_TP_IP_PARAM));       \
                __ret = __chan->ops->event_reserve(&__ctx);                   \
                if (__ret < 0)                                                \
                        return;                                               \
index 2d91d8acd84961ac3a84e9a3bca550036fd64827..c50aee9dcccb08f6310929661e349830be5d4e30 100644 (file)
@@ -11,7 +11,7 @@
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
-#define TP_IP_PARAM func_addr
+#define LTTNG_UST_TP_IP_PARAM func_addr
 #include "lttng-ust-cyg-profile-fast.h"
 
 void __cyg_profile_func_enter(void *this_fn, void *call_site)
index e0a0dd61eb250cd00102ad03a6409e1fa824ab52..33f721c704b3c4fd95e82be8cb6398e05c047ab5 100644 (file)
@@ -11,7 +11,7 @@
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
-#define TP_IP_PARAM func_addr
+#define LTTNG_UST_TP_IP_PARAM func_addr
 #include "lttng-ust-cyg-profile.h"
 
 void __cyg_profile_func_enter(void *this_fn, void *call_site)
index 234857aefbf449522afe329808339abf23ac40ba..3c18a0c680787c76ac625faab2eea31abae9c318 100644 (file)
@@ -6,5 +6,5 @@
 
 #define _LGPL_SOURCE
 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
-#define TP_IP_PARAM ip
+#define LTTNG_UST_TP_IP_PARAM ip
 #include "ust_dl.h"
index d51c5ab3ee3631c9a2cdfb0a89427d06b2844e14..19c603408cc85ca7e01db81d9fbeefcc7f21c385 100644 (file)
@@ -32,7 +32,7 @@
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
-#define TP_IP_PARAM ip
+#define LTTNG_UST_TP_IP_PARAM ip
 #include "ust_libc.h"
 
 #define STATIC_CALLOC_LEN 4096
index 09881e2b35166e9c7c6d118128f2410a521584a9..71d21431d69823277f99d04c15c25ba7475c9570 100644 (file)
@@ -18,7 +18,7 @@
 
 #define LTTNG_UST_TRACEPOINT_DEFINE
 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
-#define TP_IP_PARAM ip
+#define LTTNG_UST_TP_IP_PARAM ip
 #include "ust_pthread.h"
 
 static __thread int thread_in_trace;
index 3dc509618b8aca8ae91fb11976406f4b3f51af46..de85552bc5bc9e1adf443a0ba2fcdf5c597af9b0 100644 (file)
@@ -14,7 +14,7 @@
 
 #endif /* _TRACEPOINT_LTTNG_UST_TRACEF_PROVIDER_H */
 
-#define TP_IP_PARAM ip /* IP context received as parameter */
+#define LTTNG_UST_TP_IP_PARAM ip       /* IP context received as parameter */
 #undef LTTNG_UST_TRACEPOINT_INCLUDE
 #define LTTNG_UST_TRACEPOINT_INCLUDE "./tp/lttng-ust-tracef.h"
 
index 7c70ee79ac480c835bdbe9c8a7a847e7c16f1226..d946648947b1ce130d5342e6ac36cec726b41a4c 100644 (file)
@@ -14,7 +14,7 @@
 
 #endif /* _TRACEPOINT_LTTNG_UST_TRACEF_PROVIDER_H */
 
-#define TP_IP_PARAM ip /* IP context received as parameter */
+#define LTTNG_UST_TP_IP_PARAM ip       /* IP context received as parameter */
 #undef LTTNG_UST_TRACEPOINT_INCLUDE
 #define LTTNG_UST_TRACEPOINT_INCLUDE "./tp/lttng-ust-tracelog.h"
 
index e56a43f69b6d4a154767580ab6cee5a8a6045a85..12cb3a8a771b5796c54c809cd2f8a6feff95b0e7 100644 (file)
@@ -7,5 +7,5 @@
 
 #define _LGPL_SOURCE
 #define LTTNG_UST_TRACEPOINT_CREATE_PROBES
-#define TP_IP_PARAM ip
+#define LTTNG_UST_TP_IP_PARAM ip
 #include "ust_lib.h"
This page took 0.03011 seconds and 4 git commands to generate.