Tracepoint API namespacing 'tracepoint_destructors_syms'
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 19 Apr 2021 20:28:55 +0000 (16:28 -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: I775858f7533c6fc2fad4a1d51e5a677c1a7d5cbb
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
include/lttng/tracepoint.h

index 5358f1cef0d65b593d79705efdc6c0efe19bb94e..31cafe4df3be4d5512c787dec2eec896a45e9a77 100644 (file)
@@ -312,25 +312,25 @@ struct lttng_ust_tracepoint_destructors_syms {
        /* End of base ABI. Fields below should be used after checking struct_size. */
 };
 
-extern struct lttng_ust_tracepoint_destructors_syms tracepoint_destructors_syms;
-extern struct lttng_ust_tracepoint_destructors_syms *tracepoint_destructors_syms_ptr;
+extern struct lttng_ust_tracepoint_destructors_syms lttng_ust_tracepoint_destructors_syms;
+extern struct lttng_ust_tracepoint_destructors_syms *lttng_ust_tracepoint_destructors_syms_ptr;
 
-struct lttng_ust_tracepoint_destructors_syms tracepoint_destructors_syms
+struct lttng_ust_tracepoint_destructors_syms lttng_ust_tracepoint_destructors_syms
        __attribute__((weak, visibility("hidden"))) = {
        .struct_size = sizeof(struct lttng_ust_tracepoint_destructors_syms),
 };
-struct lttng_ust_tracepoint_destructors_syms *tracepoint_destructors_syms_ptr
+struct lttng_ust_tracepoint_destructors_syms *lttng_ust_tracepoint_destructors_syms_ptr
        __attribute__((weak, visibility("hidden")));
 
 static inline void tracepoint_disable_destructors(void)
 {
        if (!lttng_ust_tracepoint_dlopen_ptr)
                lttng_ust_tracepoint_dlopen_ptr = &lttng_ust_tracepoint_dlopen;
-       if (!tracepoint_destructors_syms_ptr)
-               tracepoint_destructors_syms_ptr = &tracepoint_destructors_syms;
+       if (!lttng_ust_tracepoint_destructors_syms_ptr)
+               lttng_ust_tracepoint_destructors_syms_ptr = &lttng_ust_tracepoint_destructors_syms;
        if (lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle
-                       && tracepoint_destructors_syms_ptr->tracepoint_disable_destructors)
-               tracepoint_destructors_syms_ptr->tracepoint_disable_destructors();
+                       && lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_disable_destructors)
+               lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_disable_destructors();
 }
 
 #ifndef _LGPL_SOURCE
@@ -407,8 +407,8 @@ __tracepoints__destroy(void)
                return;
        if (!lttng_ust_tracepoint_dlopen_ptr)
                lttng_ust_tracepoint_dlopen_ptr = &lttng_ust_tracepoint_dlopen;
-       if (!tracepoint_destructors_syms_ptr)
-               tracepoint_destructors_syms_ptr = &tracepoint_destructors_syms;
+       if (!lttng_ust_tracepoint_destructors_syms_ptr)
+               lttng_ust_tracepoint_destructors_syms_ptr = &lttng_ust_tracepoint_destructors_syms;
        if (!lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle)
                return;
        if (__tracepoint_ptrs_registered)
@@ -416,8 +416,8 @@ __tracepoints__destroy(void)
        /*
         * Lookup if destructors must be executed using the new method.
         */
-       if (tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state
-               && !tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state()) {
+       if (lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state
+               && !lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state()) {
                /*
                 * The tracepoint_get_destructors_state symbol was found with
                 * dlsym but its returned value is 0 meaning that destructors
@@ -507,8 +507,8 @@ __tracepoints__ptrs_init(void)
                        dlopen(LTTNG_UST_TRACEPOINT_LIB_SONAME, RTLD_NOW | RTLD_GLOBAL);
        if (!lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle)
                return;
-       if (!tracepoint_destructors_syms_ptr)
-               tracepoint_destructors_syms_ptr = &tracepoint_destructors_syms;
+       if (!lttng_ust_tracepoint_destructors_syms_ptr)
+               lttng_ust_tracepoint_destructors_syms_ptr = &lttng_ust_tracepoint_destructors_syms;
        lttng_ust_tracepoint_dlopen_ptr->tracepoint_register_lib =
                URCU_FORCE_CAST(int (*)(struct lttng_ust_tracepoint * const *, int),
                                dlsym(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle,
@@ -517,11 +517,11 @@ __tracepoints__ptrs_init(void)
                URCU_FORCE_CAST(int (*)(struct lttng_ust_tracepoint * const *),
                                dlsym(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle,
                                        "tracepoint_unregister_lib"));
-       tracepoint_destructors_syms_ptr->tracepoint_disable_destructors =
+       lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_disable_destructors =
                URCU_FORCE_CAST(void (*)(void),
                                dlsym(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle,
                                        "tp_disable_destructors"));
-       tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state =
+       lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state =
                URCU_FORCE_CAST(int (*)(void),
                                dlsym(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle,
                                        "tp_get_destructors_state"));
@@ -545,13 +545,13 @@ __tracepoints__ptrs_destroy(void)
                return;
        if (!lttng_ust_tracepoint_dlopen_ptr)
                lttng_ust_tracepoint_dlopen_ptr = &lttng_ust_tracepoint_dlopen;
-       if (!tracepoint_destructors_syms_ptr)
-               tracepoint_destructors_syms_ptr = &tracepoint_destructors_syms;
+       if (!lttng_ust_tracepoint_destructors_syms_ptr)
+               lttng_ust_tracepoint_destructors_syms_ptr = &lttng_ust_tracepoint_destructors_syms;
        if (lttng_ust_tracepoint_dlopen_ptr->tracepoint_unregister_lib)
                lttng_ust_tracepoint_dlopen_ptr->tracepoint_unregister_lib(__start___tracepoints_ptrs);
        if (lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle
-                       && tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state
-                       && tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state()
+                       && lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state
+                       && lttng_ust_tracepoint_destructors_syms_ptr->tracepoint_get_destructors_state()
                        && !__tracepoint_ptrs_registered) {
                ret = dlclose(lttng_ust_tracepoint_dlopen_ptr->liblttngust_handle);
                if (ret) {
This page took 0.027203 seconds and 4 git commands to generate.