Fix: liblttng-ust-ctl: missing ring buffer and counter clients init/exit symbols
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 30 Mar 2021 19:59:02 +0000 (15:59 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 30 Mar 2021 19:59:02 +0000 (15:59 -0400)
Move init/exit functions to ust-core.c which is linked against by both
liblttng-ust and liblttng-ust-ctl to make them available to the control
library.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I70bd2841c941df8e4d25629a0747aaebe57e0569

liblttng-ust/lttng-counter-client.h
liblttng-ust/lttng-rb-clients.h
liblttng-ust/lttng-ust-comm.c
liblttng-ust/ust-core.c
liblttng-ust/ust-events-internal.h

index 5aa866191266bd05ac026a9780c446433aec2c61..dcb01de5c70da44e94770656140852a6a8f906a7 100644 (file)
 #define _LTTNG_UST_COUNTER_CLIENT_H
 
 /*
- * These symbol are part of the private ABI between liblttng-ust and
- * liblttng-ust-ctl.
+ * The counter clients init/exit symbols are private ABI for
+ * liblttng-ust-ctl, which is why they are not hidden.
  */
+
+void lttng_ust_counter_clients_init(void);
+void lttng_ust_counter_clients_exit(void);
+
+__attribute__((visibility("hidden")))
 void lttng_counter_client_percpu_32_modular_init(void);
+__attribute__((visibility("hidden")))
 void lttng_counter_client_percpu_32_modular_exit(void);
+__attribute__((visibility("hidden")))
 void lttng_counter_client_percpu_64_modular_init(void);
+__attribute__((visibility("hidden")))
 void lttng_counter_client_percpu_64_modular_exit(void);
 
 #endif
index 4b6999e4e3974a98c0ab1d2e08b24683a98336ee..4ebc0dee50884428c30f1730d2268d5f0a798a77 100644 (file)
@@ -8,6 +8,7 @@
 #define _LTTNG_RB_CLIENT_H
 
 #include <stdint.h>
+#include "../libringbuffer/ringbuffer-config.h"
 
 struct lttng_ust_client_lib_ring_buffer_client_cb {
        struct lttng_ust_lib_ring_buffer_client_cb parent;
@@ -40,13 +41,41 @@ struct lttng_ust_client_lib_ring_buffer_client_cb {
 };
 
 /*
- * The ring buffer and counter clients init/exit symbols are private ABI
- * for liblttng-ust-ctl, which is why they are not hidden.
+ * The ring buffer clients init/exit symbols are private ABI for
+ * liblttng-ust-ctl, which is why they are not hidden.
  */
 void lttng_ust_ring_buffer_clients_init(void);
 void lttng_ust_ring_buffer_clients_exit(void);
 
-void lttng_ust_counter_clients_init(void);
-void lttng_ust_counter_clients_exit(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_overwrite_init(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_overwrite_rt_init(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_discard_init(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_discard_rt_init(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_metadata_client_init(void);
+
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_overwrite_exit(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_overwrite_rt_exit(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_discard_exit(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_client_discard_rt_exit(void);
+__attribute__((visibility("hidden")))
+void lttng_ring_buffer_metadata_client_exit(void);
+
+__attribute__((visibility("hidden")))
+void lttng_ust_fixup_ring_buffer_client_overwrite_tls(void);
+__attribute__((visibility("hidden")))
+void lttng_ust_fixup_ring_buffer_client_overwrite_rt_tls(void);
+__attribute__((visibility("hidden")))
+void lttng_ust_fixup_ring_buffer_client_discard_tls(void);
+__attribute__((visibility("hidden")))
+void lttng_ust_fixup_ring_buffer_client_discard_rt_tls(void);
 
 #endif /* _LTTNG_RB_CLIENT_H */
index 07ae9a348f99ef26c6ec99be958ed7de2fd85d1c..7e587499efd2b14ce484a54a232fde6e3a5f4401 100644 (file)
@@ -54,6 +54,7 @@
 #include "context-internal.h"
 #include "ust-compat.h"
 #include "lttng-counter-client.h"
+#include "lttng-rb-clients.h"
 
 /*
  * Has lttng ust comm constructor been called ?
@@ -2062,36 +2063,6 @@ void lttng_ust_libc_wrapper_malloc_init(void)
 {
 }
 
-void lttng_ust_ring_buffer_clients_init(void)
-{
-       lttng_ring_buffer_metadata_client_init();
-       lttng_ring_buffer_client_overwrite_init();
-       lttng_ring_buffer_client_overwrite_rt_init();
-       lttng_ring_buffer_client_discard_init();
-       lttng_ring_buffer_client_discard_rt_init();
-}
-
-void lttng_ust_ring_buffer_clients_exit(void)
-{
-       lttng_ring_buffer_client_discard_rt_exit();
-       lttng_ring_buffer_client_discard_exit();
-       lttng_ring_buffer_client_overwrite_rt_exit();
-       lttng_ring_buffer_client_overwrite_exit();
-       lttng_ring_buffer_metadata_client_exit();
-}
-
-void lttng_ust_counter_clients_init(void)
-{
-       lttng_counter_client_percpu_64_modular_init();
-       lttng_counter_client_percpu_32_modular_init();
-}
-
-void lttng_ust_counter_clients_exit(void)
-{
-       lttng_counter_client_percpu_32_modular_exit();
-       lttng_counter_client_percpu_64_modular_exit();
-}
-
 /*
  * sessiond monitoring thread: monitor presence of global and per-user
  * sessiond by polling the application common named pipe.
index 88d4f5589b3426beb030cd56be83d583678126f9..61293d137868ec804c954fca12005d38f455fde6 100644 (file)
@@ -13,6 +13,8 @@
 #include "ust-events-internal.h"
 #include <usterr-signal-safe.h>
 #include "lttng-tracer-core.h"
+#include "lttng-rb-clients.h"
+#include "lttng-counter-client.h"
 #include "jhash.h"
 
 static CDS_LIST_HEAD(lttng_transport_list);
@@ -190,3 +192,33 @@ void lttng_ust_free_channel_common(struct lttng_ust_channel_common *chan)
                abort();
        }
 }
+
+void lttng_ust_ring_buffer_clients_init(void)
+{
+       lttng_ring_buffer_metadata_client_init();
+       lttng_ring_buffer_client_overwrite_init();
+       lttng_ring_buffer_client_overwrite_rt_init();
+       lttng_ring_buffer_client_discard_init();
+       lttng_ring_buffer_client_discard_rt_init();
+}
+
+void lttng_ust_ring_buffer_clients_exit(void)
+{
+       lttng_ring_buffer_client_discard_rt_exit();
+       lttng_ring_buffer_client_discard_exit();
+       lttng_ring_buffer_client_overwrite_rt_exit();
+       lttng_ring_buffer_client_overwrite_exit();
+       lttng_ring_buffer_metadata_client_exit();
+}
+
+void lttng_ust_counter_clients_init(void)
+{
+       lttng_counter_client_percpu_64_modular_init();
+       lttng_counter_client_percpu_32_modular_init();
+}
+
+void lttng_ust_counter_clients_exit(void)
+{
+       lttng_counter_client_percpu_32_modular_exit();
+       lttng_counter_client_percpu_64_modular_exit();
+}
index e8c44be40499132ef4c71f214935e24ec0117d16..055e4f6eab259b633b615015a449a888f3538d52 100644 (file)
@@ -908,35 +908,4 @@ __attribute__((visibility("hidden")))
 void lttng_ust_format_event_name(const struct lttng_ust_event_desc *desc,
                char *name);
 
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_overwrite_init(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_overwrite_rt_init(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_discard_init(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_discard_rt_init(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_metadata_client_init(void);
-
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_overwrite_exit(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_overwrite_rt_exit(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_discard_exit(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_client_discard_rt_exit(void);
-__attribute__((visibility("hidden")))
-void lttng_ring_buffer_metadata_client_exit(void);
-
-__attribute__((visibility("hidden")))
-void lttng_ust_fixup_ring_buffer_client_overwrite_tls(void);
-__attribute__((visibility("hidden")))
-void lttng_ust_fixup_ring_buffer_client_overwrite_rt_tls(void);
-__attribute__((visibility("hidden")))
-void lttng_ust_fixup_ring_buffer_client_discard_tls(void);
-__attribute__((visibility("hidden")))
-void lttng_ust_fixup_ring_buffer_client_discard_rt_tls(void);
-
 #endif /* _LTTNG_UST_EVENTS_INTERNAL_H */
This page took 0.02922 seconds and 4 git commands to generate.