Move private ABI counter client symbols to dedicated header
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 24 Mar 2021 18:44:05 +0000 (14:44 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 29 Mar 2021 18:04:22 +0000 (14:04 -0400)
The counter client percpu functions are provided by liblttng-ust and used
by liblttng-ust-ctl. Make them part of the private ABI.

Change-Id: I5fe3c16cb46ac3998dbdc037ccdb71170fc03f61
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-ctl/ustctl.c
liblttng-ust/Makefile.am
liblttng-ust/lttng-counter-client-percpu-32-modular.c
liblttng-ust/lttng-counter-client-percpu-64-modular.c
liblttng-ust/lttng-counter-client.h [new file with mode: 0644]
liblttng-ust/lttng-ust-comm.c
liblttng-ust/ust-core.c

index 2838599035a71bafb44a4f13de62d6bfbd9732c5..a498f70c8797eaeaf9c93d76aee566df5ed3f81e 100644 (file)
@@ -30,6 +30,7 @@
 #include "../liblttng-ust/clock.h"
 #include "../liblttng-ust/getenv.h"
 #include "../liblttng-ust/lttng-tracer-core.h"
+#include "../liblttng-ust/lttng-counter-client.h"
 
 #include "../libcounter/shm.h"
 #include "../libcounter/smp.h"
@@ -94,18 +95,6 @@ extern void lttng_ring_buffer_client_discard_exit(void);
 extern void lttng_ring_buffer_client_discard_rt_exit(void);
 extern void lttng_ring_buffer_metadata_client_exit(void);
 
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_32_modular_init(void);
-
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_32_modular_exit(void);
-
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_64_modular_init(void);
-
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_64_modular_exit(void);
-
 int ustctl_release_handle(int sock, int handle)
 {
        struct ustcomm_ust_msg lum;
index 8665be876ab21e2c6a9263842ab3be2b921aefc7..42362e72e87f9af67e4ba16c7eb4a334bf9d1abc 100644 (file)
@@ -119,6 +119,7 @@ liblttng_ust_support_la_SOURCES = \
        lttng-ring-buffer-client-overwrite-rt.c \
        lttng-ring-buffer-metadata-client.h \
        lttng-ring-buffer-metadata-client.c \
+       lttng-counter-client.h \
        lttng-counter-client-percpu-32-modular.c \
        lttng-counter-client-percpu-64-modular.c \
        lttng-clock.c lttng-getcpu.c
index abcdd48055bb701d7af3e2c3715bbd99b5dfd901..f6e5bdfdb1dd49f455c8d2b1131eb3720b262903 100644 (file)
@@ -12,6 +12,7 @@
 #include "../libcounter/counter.h"
 #include "../libcounter/counter-api.h"
 #include "lttng-tracer-core.h"
+#include "lttng-counter-client.h"
 
 static const struct lib_counter_config client_config = {
        .alloc = COUNTER_ALLOC_PER_CPU,
index a572ec8c353c78a1d3f8bb8178891270a2a8e731..0a49cfd3ba5f527b859f8db3e5622c1e83caeb30 100644 (file)
@@ -12,6 +12,7 @@
 #include "../libcounter/counter.h"
 #include "../libcounter/counter-api.h"
 #include "lttng-tracer-core.h"
+#include "lttng-counter-client.h"
 
 static const struct lib_counter_config client_config = {
        .alloc = COUNTER_ALLOC_PER_CPU,
diff --git a/liblttng-ust/lttng-counter-client.h b/liblttng-ust/lttng-counter-client.h
new file mode 100644 (file)
index 0000000..5aa8661
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+ * SPDX-License-Identifier: (GPL-2.0-only or LGPL-2.1-only)
+ *
+ * Copyright (C) 2020 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+ *
+ * LTTng lib counter client.
+ */
+
+#ifndef _LTTNG_UST_COUNTER_CLIENT_H
+#define _LTTNG_UST_COUNTER_CLIENT_H
+
+/*
+ * These symbol are part of the private ABI between liblttng-ust and
+ * liblttng-ust-ctl.
+ */
+void lttng_counter_client_percpu_32_modular_init(void);
+void lttng_counter_client_percpu_32_modular_exit(void);
+void lttng_counter_client_percpu_64_modular_init(void);
+void lttng_counter_client_percpu_64_modular_exit(void);
+
+#endif
index 204db9de37c6ace3f9a99041b27e4dd95fd52698..cb9f8c88361cddf9fa308a31100351c1147e3b54 100644 (file)
@@ -53,6 +53,7 @@
 #include "ust-events-internal.h"
 #include "context-internal.h"
 #include "ust-compat.h"
+#include "lttng-counter-client.h"
 
 /*
  * Has lttng ust comm constructor been called ?
@@ -361,18 +362,6 @@ extern void lttng_ring_buffer_client_discard_exit(void);
 extern void lttng_ring_buffer_client_discard_rt_exit(void);
 extern void lttng_ring_buffer_metadata_client_exit(void);
 
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_32_modular_init(void);
-
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_32_modular_exit(void);
-
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_64_modular_init(void);
-
-__attribute__((visibility("hidden")))
-extern void lttng_counter_client_percpu_64_modular_exit(void);
-
 static char *get_map_shm(struct sock_info *sock_info);
 
 ssize_t lttng_ust_read(int fd, void *buf, size_t len)
index 7bd55aba4a054cded14e7c0655f4098d896c443e..089dd9107aa107f5398a344f556e3153c04cccde 100644 (file)
@@ -9,6 +9,7 @@
 #include <stddef.h>
 #include <stdlib.h>
 
+#include "context-internal.h"
 #include "ust-events-internal.h"
 #include <usterr-signal-safe.h>
 #include "lttng-tracer-core.h"
This page took 0.027714 seconds and 4 git commands to generate.