Hide libringbuffer private symbols
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 2 Mar 2021 17:41:15 +0000 (12:41 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 2 Mar 2021 19:24:07 +0000 (14:24 -0500)
The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Change-Id: I605c3d560ad03affe79d3518ec35ba484e892c3b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
libringbuffer/backend.h
libringbuffer/backend_internal.h
libringbuffer/frontend.h
libringbuffer/frontend_internal.h
libringbuffer/getcpu.h
libringbuffer/nohz.h
libringbuffer/rb-init.h
libringbuffer/shm.h
libringbuffer/smp.h

index 98c194ca5bf988603646071b778ac936b1add00d..dbb5d7353c878f670369f236f791971f664d691e 100644 (file)
@@ -15,6 +15,8 @@
 #include <stddef.h>
 #include <unistd.h>
 
+#include "ust-helper.h"
+
 /* Internal helpers */
 #include "backend_internal.h"
 #include "frontend_internal.h"
 
 /* Ring buffer backend access (read/write) */
 
+LTTNG_HIDDEN
 extern size_t lib_ring_buffer_read(struct lttng_ust_lib_ring_buffer_backend *bufb,
                                   size_t offset, void *dest, size_t len,
                                   struct lttng_ust_shm_handle *handle);
 
+LTTNG_HIDDEN
 extern int lib_ring_buffer_read_cstr(struct lttng_ust_lib_ring_buffer_backend *bufb,
                                     size_t offset, void *dest, size_t len,
                                     struct lttng_ust_shm_handle *handle);
@@ -37,10 +41,12 @@ extern int lib_ring_buffer_read_cstr(struct lttng_ust_lib_ring_buffer_backend *b
  * it's never on a page boundary, it's safe to write directly to this address,
  * as long as the write is never bigger than a page size.
  */
+LTTNG_HIDDEN
 extern void *
 lib_ring_buffer_offset_address(struct lttng_ust_lib_ring_buffer_backend *bufb,
                               size_t offset,
                               struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern void *
 lib_ring_buffer_read_offset_address(struct lttng_ust_lib_ring_buffer_backend *bufb,
                                    size_t offset,
index 538176142bbdd462868217ceb4b0963eb284226f..b8a1699046ff293fc8fc0c2df447fd419753e7a5 100644 (file)
 #include "backend_types.h"
 #include "frontend_types.h"
 #include "shm.h"
+#include "ust-helper.h"
 
 /* Ring buffer backend API presented to the frontend */
 
 /* Ring buffer and channel backend create/free */
 
+LTTNG_HIDDEN
 int lib_ring_buffer_backend_create(struct lttng_ust_lib_ring_buffer_backend *bufb,
                                   struct channel_backend *chan, int cpu,
                                   struct lttng_ust_shm_handle *handle,
                                   struct shm_object *shmobj);
+LTTNG_HIDDEN
 void channel_backend_unregister_notifiers(struct channel_backend *chanb);
+LTTNG_HIDDEN
 void lib_ring_buffer_backend_free(struct lttng_ust_lib_ring_buffer_backend *bufb);
+LTTNG_HIDDEN
 int channel_backend_init(struct channel_backend *chanb,
                         const char *name,
                         const struct lttng_ust_lib_ring_buffer_config *config,
                         size_t subbuf_size,
                         size_t num_subbuf, struct lttng_ust_shm_handle *handle,
                         const int *stream_fds);
+LTTNG_HIDDEN
 void channel_backend_free(struct channel_backend *chanb,
                          struct lttng_ust_shm_handle *handle);
 
+LTTNG_HIDDEN
 void lib_ring_buffer_backend_reset(struct lttng_ust_lib_ring_buffer_backend *bufb,
                                   struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 void channel_backend_reset(struct channel_backend *chanb);
 
+LTTNG_HIDDEN
 int lib_ring_buffer_backend_init(void);
+LTTNG_HIDDEN
 void lib_ring_buffer_backend_exit(void);
 
+LTTNG_HIDDEN
 extern void _lib_ring_buffer_write(struct lttng_ust_lib_ring_buffer_backend *bufb,
                                   size_t offset, const void *src, size_t len,
                                   ssize_t pagecpy);
index bac86d17cdbcdd925637e114f5ab2eadb7dc44ef..9bc22df887228dd2a49d68dbedf4bf9ae7800b0f 100644 (file)
@@ -18,6 +18,8 @@
 #include <urcu/uatomic.h>
 
 #include "smp.h"
+#include "ust-helper.h"
+
 /* Internal helpers */
 #include "frontend_internal.h"
 
@@ -39,6 +41,7 @@
  * private data area.
  */
 
+LTTNG_HIDDEN
 extern
 struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buffer_config *config,
                                const char *name,
@@ -57,6 +60,7 @@ struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buff
  * channel_destroy finalizes all channel's buffers, waits for readers to
  * release all references, and destroys the channel.
  */
+LTTNG_HIDDEN
 extern
 void channel_destroy(struct channel *chan, struct lttng_ust_shm_handle *handle,
                int consumer);
@@ -73,6 +77,7 @@ void channel_destroy(struct channel *chan, struct lttng_ust_shm_handle *handle,
 #define for_each_channel_cpu(cpu, chan)                                        \
        for_each_possible_cpu(cpu)
 
+LTTNG_HIDDEN
 extern struct lttng_ust_lib_ring_buffer *channel_get_ring_buffer(
                                const struct lttng_ust_lib_ring_buffer_config *config,
                                struct channel *chan, int cpu,
@@ -80,27 +85,33 @@ extern struct lttng_ust_lib_ring_buffer *channel_get_ring_buffer(
                                int *shm_fd, int *wait_fd,
                                int *wakeup_fd,
                                uint64_t *memory_map_size);
+LTTNG_HIDDEN
 extern
 int ring_buffer_channel_close_wait_fd(const struct lttng_ust_lib_ring_buffer_config *config,
                        struct channel *chan,
                        struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern
 int ring_buffer_channel_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_config *config,
                        struct channel *chan,
                        struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern
 int ring_buffer_stream_close_wait_fd(const struct lttng_ust_lib_ring_buffer_config *config,
                struct channel *chan,
                struct lttng_ust_shm_handle *handle,
                int cpu);
+LTTNG_HIDDEN
 extern
 int ring_buffer_stream_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_config *config,
                struct channel *chan,
                struct lttng_ust_shm_handle *handle,
                int cpu);
 
+LTTNG_HIDDEN
 extern int lib_ring_buffer_open_read(struct lttng_ust_lib_ring_buffer *buf,
                                     struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern void lib_ring_buffer_release_read(struct lttng_ust_lib_ring_buffer *buf,
                                         struct lttng_ust_shm_handle *handle);
 
@@ -108,27 +119,33 @@ extern void lib_ring_buffer_release_read(struct lttng_ust_lib_ring_buffer *buf,
  * Initialize signals for ring buffer. Should be called early e.g. by
  * main() in the program to affect all threads.
  */
+LTTNG_HIDDEN
 void lib_ringbuffer_signal_init(void);
 
 /*
  * Read sequence: snapshot, many get_subbuf/put_subbuf, move_consumer.
  */
+LTTNG_HIDDEN
 extern int lib_ring_buffer_snapshot(struct lttng_ust_lib_ring_buffer *buf,
                                    unsigned long *consumed,
                                    unsigned long *produced,
                                    struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern int lib_ring_buffer_snapshot_sample_positions(
                                    struct lttng_ust_lib_ring_buffer *buf,
                                    unsigned long *consumed,
                                    unsigned long *produced,
                                    struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern void lib_ring_buffer_move_consumer(struct lttng_ust_lib_ring_buffer *buf,
                                          unsigned long consumed_new,
                                          struct lttng_ust_shm_handle *handle);
 
+LTTNG_HIDDEN
 extern int lib_ring_buffer_get_subbuf(struct lttng_ust_lib_ring_buffer *buf,
                                      unsigned long consumed,
                                      struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern void lib_ring_buffer_put_subbuf(struct lttng_ust_lib_ring_buffer *buf,
                                       struct lttng_ust_shm_handle *handle);
 
@@ -163,7 +180,9 @@ void lib_ring_buffer_put_next_subbuf(struct lttng_ust_lib_ring_buffer *buf,
                        handle);
 }
 
+LTTNG_HIDDEN
 extern void channel_reset(struct channel *chan);
+LTTNG_HIDDEN
 extern void lib_ring_buffer_reset(struct lttng_ust_lib_ring_buffer *buf,
                                  struct lttng_ust_shm_handle *handle);
 
index 9c6a8db78ecdd50dc9d510e99cfdc182fa868a18..c8a54e96a83cd52ed1f29877c1b98cd1871ced4e 100644 (file)
@@ -21,6 +21,7 @@
 #include "backend_types.h"
 #include "frontend_types.h"
 #include "shm.h"
+#include "ust-helper.h"
 
 /* Buffer offset macros */
 
@@ -138,15 +139,18 @@ int last_tsc_overflow(const struct lttng_ust_lib_ring_buffer_config *config,
 }
 #endif
 
+LTTNG_HIDDEN
 extern
 int lib_ring_buffer_reserve_slow(struct lttng_ust_lib_ring_buffer_ctx *ctx,
                void *client_ctx);
 
+LTTNG_HIDDEN
 extern
 void lib_ring_buffer_switch_slow(struct lttng_ust_lib_ring_buffer *buf,
                                 enum switch_mode mode,
                                 struct lttng_ust_shm_handle *handle);
 
+LTTNG_HIDDEN
 void lib_ring_buffer_check_deliver_slow(const struct lttng_ust_lib_ring_buffer_config *config,
                                   struct lttng_ust_lib_ring_buffer *buf,
                                   struct channel *chan,
@@ -337,14 +341,17 @@ void lib_ring_buffer_write_commit_counter(const struct lttng_ust_lib_ring_buffer
                v_set(config, &cc_hot->seq, commit_count);
 }
 
+LTTNG_HIDDEN
 extern int lib_ring_buffer_create(struct lttng_ust_lib_ring_buffer *buf,
                                  struct channel_backend *chanb, int cpu,
                                  struct lttng_ust_shm_handle *handle,
                                  struct shm_object *shmobj);
+LTTNG_HIDDEN
 extern void lib_ring_buffer_free(struct lttng_ust_lib_ring_buffer *buf,
                                 struct lttng_ust_shm_handle *handle);
 
 /* Keep track of trap nesting inside ring buffer code */
+LTTNG_HIDDEN
 extern DECLARE_URCU_TLS(unsigned int, lib_ring_buffer_nesting);
 
 #endif /* _LTTNG_RING_BUFFER_FRONTEND_INTERNAL_H */
index bb815e66141171aa4af62595dcec4a9d66184d4c..8785d4969212a36ced07ee20d2fc1bdaf2bb2391 100644 (file)
 #include <urcu/system.h>
 #include <urcu/arch.h>
 
+#include "ust-helper.h"
+
+LTTNG_HIDDEN
 void lttng_ust_getcpu_init(void);
 
+LTTNG_HIDDEN
 extern int (*lttng_get_cpu)(void);
 
 #ifdef LTTNG_UST_DEBUG_VALGRIND
index 078d154c7fa2c2a772107f7872b412c37687e62d..2898cc43197a418a76dbb2289db1d38aa0a945cc 100644 (file)
@@ -7,9 +7,14 @@
 #ifndef _LTTNG_RING_BUFFER_NOHZ_H
 #define _LTTNG_RING_BUFFER_NOHZ_H
 
+#include "ust-helper.h"
+
 #ifdef CONFIG_LIB_RING_BUFFER
+LTTNG_HIDDEN
 void lib_ring_buffer_tick_nohz_flush(void);
+LTTNG_HIDDEN
 void lib_ring_buffer_tick_nohz_stop(void);
+LTTNG_HIDDEN
 void lib_ring_buffer_tick_nohz_restart(void);
 #else
 static inline void lib_ring_buffer_tick_nohz_flush(void)
index 46157a9012537888449ac05236c1145bbd3c65b8..319cf4140bcea0ab561113abf91d077537df8d38 100644 (file)
@@ -7,7 +7,11 @@
 #ifndef _LTTNG_UST_LIB_RINGBUFFER_RB_INIT_H
 #define _LTTNG_UST_LIB_RINGBUFFER_RB_INIT_H
 
+#include "ust-helper.h"
+
+LTTNG_HIDDEN
 void lttng_fixup_ringbuffer_tls(void);
+LTTNG_HIDDEN
 void lttng_ust_ringbuffer_set_allow_blocking(void);
 
 #endif /* _LTTNG_UST_LIB_RINGBUFFER_RB_INIT_H */
index e4a466e5a2f0853c12644885f1b20f39c380eb7e..ee8438587c06e7fcfcaab59f74111397b45531e6 100644 (file)
 #include <usterr-signal-safe.h>
 #include <urcu/compiler.h>
 #include "shm_types.h"
+#include "ust-helper.h"
 
 /* channel_handle_create - for UST. */
+LTTNG_HIDDEN
 extern
 struct lttng_ust_shm_handle *channel_handle_create(void *data,
                                uint64_t memory_map_size, int wakeup_fd);
 /* channel_handle_add_stream - for UST. */
+LTTNG_HIDDEN
 extern
 int channel_handle_add_stream(struct lttng_ust_shm_handle *handle,
                int shm_fd, int wakeup_fd, uint32_t stream_nr,
                uint64_t memory_map_size);
+LTTNG_HIDDEN
 unsigned int channel_handle_get_nr_streams(struct lttng_ust_shm_handle *handle);
+LTTNG_HIDDEN
 extern
 void channel_destroy(struct channel *chan, struct lttng_ust_shm_handle *handle,
                int consumer);
@@ -73,18 +78,23 @@ void _set_shmp(struct shm_ref *ref, struct shm_ref src)
 
 #define set_shmp(ref, src)     _set_shmp(&(ref)._ref, src)
 
+LTTNG_HIDDEN
 struct shm_object_table *shm_object_table_create(size_t max_nb_obj);
+LTTNG_HIDDEN
 struct shm_object *shm_object_table_alloc(struct shm_object_table *table,
                        size_t memory_map_size,
                        enum shm_object_type type,
                        const int stream_fd,
                        int cpu);
+LTTNG_HIDDEN
 struct shm_object *shm_object_table_append_shm(struct shm_object_table *table,
                        int shm_fd, int wakeup_fd, uint32_t stream_nr,
                        size_t memory_map_size);
 /* mem ownership is passed to shm_object_table_append_mem(). */
+LTTNG_HIDDEN
 struct shm_object *shm_object_table_append_mem(struct shm_object_table *table,
                        void *mem, size_t memory_map_size, int wakeup_fd);
+LTTNG_HIDDEN
 void shm_object_table_destroy(struct shm_object_table *table, int consumer);
 
 /*
@@ -94,7 +104,9 @@ void shm_object_table_destroy(struct shm_object_table *table, int consumer);
  * *NOT* multithread-safe (should be protected by mutex).
  * Returns a -1, -1 tuple on error.
  */
+LTTNG_HIDDEN
 struct shm_ref zalloc_shm(struct shm_object *obj, size_t len);
+LTTNG_HIDDEN
 void align_shm(struct shm_object *obj, size_t align);
 
 static inline
index ebeae66773c2ccec935619697417dd7aa2e0fd36..b04401e1d9a94f2d36e35d394e83035ba0eb2fd2 100644 (file)
@@ -7,6 +7,7 @@
 #ifndef _LIBRINGBUFFER_SMP_H
 #define _LIBRINGBUFFER_SMP_H
 
+#include "ust-helper.h"
 #include "getcpu.h"
 
 /*
@@ -15,7 +16,9 @@
  */
 #define PER_CPU_MEM_SIZE       4096
 
+LTTNG_HIDDEN
 extern int __num_possible_cpus;
+LTTNG_HIDDEN
 extern void _get_num_possible_cpus(void);
 
 static inline
This page took 0.030444 seconds and 4 git commands to generate.