From: Michael Jeanson Date: Tue, 30 Mar 2021 19:44:02 +0000 (-0400) Subject: cleanup: function attribute 'hidden' X-Git-Tag: v2.13.0-rc1~163 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=1d18d519668cd559dcafa1f18113edceb2418ed0;p=lttng-ust.git cleanup: function attribute 'hidden' Function attributes should be located after the declaration. Change-Id: I519421804e62181b49173f9239a43d6d9c21c216 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/ust-tracepoint-event.h b/include/lttng/ust-tracepoint-event.h index 27229182..c4ec05eb 100644 --- a/include/lttng/ust-tracepoint-event.h +++ b/include/lttng/ust-tracepoint-event.h @@ -1108,4 +1108,4 @@ _TP_COMBINE_TOKENS(__lttng_events_exit__, TRACEPOINT_PROVIDER)(void) } int _TP_COMBINE_TOKENS(__tracepoint_provider_, TRACEPOINT_PROVIDER) -__attribute__((visibility("default"))); + __attribute__((visibility("default"))); diff --git a/include/ust-comm.h b/include/ust-comm.h index 88748ce5..63647a3e 100644 --- a/include/ust-comm.h +++ b/include/ust-comm.h @@ -194,78 +194,77 @@ struct ustcomm_notify_channel_reply { * struct lttng_ust_field_iter field. */ -__attribute__((visibility("hidden"))) -int ustcomm_create_unix_sock(const char *pathname); +int ustcomm_create_unix_sock(const char *pathname) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int ustcomm_connect_unix_sock(const char *pathname, - long timeout); + long timeout) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int ustcomm_accept_unix_sock(int sock); +int ustcomm_accept_unix_sock(int sock) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int ustcomm_listen_unix_sock(int sock); +int ustcomm_listen_unix_sock(int sock) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int ustcomm_close_unix_sock(int sock); +int ustcomm_close_unix_sock(int sock) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -ssize_t ustcomm_recv_unix_sock(int sock, void *buf, size_t len); +ssize_t ustcomm_recv_unix_sock(int sock, void *buf, size_t len) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -ssize_t ustcomm_send_unix_sock(int sock, const void *buf, size_t len); +ssize_t ustcomm_send_unix_sock(int sock, const void *buf, size_t len) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -ssize_t ustcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd); +ssize_t ustcomm_send_fds_unix_sock(int sock, int *fds, size_t nb_fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -ssize_t ustcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd); +ssize_t ustcomm_recv_fds_unix_sock(int sock, int *fds, size_t nb_fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -const char *ustcomm_get_readable_code(int code); +const char *ustcomm_get_readable_code(int code) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int ustcomm_send_app_msg(int sock, struct ustcomm_ust_msg *lum); +int ustcomm_send_app_msg(int sock, struct ustcomm_ust_msg *lum) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int ustcomm_recv_app_reply(int sock, struct ustcomm_ust_reply *lur, - uint32_t expected_handle, uint32_t expected_cmd); + uint32_t expected_handle, uint32_t expected_cmd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int ustcomm_send_app_cmd(int sock, struct ustcomm_ust_msg *lum, - struct ustcomm_ust_reply *lur); + struct ustcomm_ust_reply *lur) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int ustcomm_recv_fd(int sock); +int ustcomm_recv_fd(int sock) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) ssize_t ustcomm_recv_channel_from_sessiond(int sock, - void **chan_data, uint64_t len, int *wakeup_fd); + void **chan_data, uint64_t len, int *wakeup_fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int ustcomm_recv_stream_from_sessiond(int sock, uint64_t *memory_map_size, - int *shm_fd, int *wakeup_fd); + int *shm_fd, int *wakeup_fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) ssize_t ustcomm_recv_event_notifier_notif_fd_from_sessiond(int sock, - int *event_notifier_notif_fd); + int *event_notifier_notif_fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) ssize_t ustcomm_recv_counter_from_sessiond(int sock, - void **counter_data, uint64_t len); + void **counter_data, uint64_t len) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int ustcomm_recv_counter_shm_from_sessiond(int sock, - int *shm_fd); + int *shm_fd) + __attribute__((visibility("hidden"))); /* * Returns 0 on success, negative error value on error. * Returns -EPIPE or -ECONNRESET if other end has hung up. */ -__attribute__((visibility("hidden"))) int ustcomm_send_reg_msg(int sock, enum ustctl_socket_type type, uint32_t bits_per_long, @@ -273,13 +272,13 @@ int ustcomm_send_reg_msg(int sock, uint32_t uint16_t_alignment, uint32_t uint32_t_alignment, uint32_t uint64_t_alignment, - uint32_t long_alignment); + uint32_t long_alignment) + __attribute__((visibility("hidden"))); /* * Returns 0 on success, negative error value on error. * Returns -EPIPE or -ECONNRESET if other end has hung up. */ -__attribute__((visibility("hidden"))) int ustcomm_register_event(int sock, struct lttng_ust_session *session, int session_objd, /* session descriptor */ @@ -290,25 +289,25 @@ int ustcomm_register_event(int sock, size_t nr_fields, /* fields */ struct lttng_ust_event_field **fields, const char *model_emf_uri, - uint32_t *id); /* event id (output) */ + uint32_t *id) /* event id (output) */ + __attribute__((visibility("hidden"))); /* * Returns 0 on success, negative error value on error. * Returns -EPIPE or -ECONNRESET if other end has hung up. */ -__attribute__((visibility("hidden"))) int ustcomm_register_enum(int sock, int session_objd, /* session descriptor */ const char *enum_name, /* enum name (input) */ size_t nr_entries, /* entries */ struct lttng_ust_enum_entry **entries, - uint64_t *id); /* enum id (output) */ + uint64_t *id) /* enum id (output) */ + __attribute__((visibility("hidden"))); /* * Returns 0 on success, negative error value on error. * Returns -EPIPE or -ECONNRESET if other end has hung up. */ -__attribute__((visibility("hidden"))) int ustcomm_register_channel(int sock, struct lttng_ust_session *session, int session_objd, /* session descriptor */ @@ -316,12 +315,13 @@ int ustcomm_register_channel(int sock, size_t nr_ctx_fields, struct lttng_ust_ctx_field **ctx_fields, uint32_t *chan_id, /* channel id (output) */ - int *header_type); /* header type (output) */ + int *header_type) /* header type (output) */ + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int ustcomm_setsockopt_rcv_timeout(int sock, unsigned int msec); +int ustcomm_setsockopt_rcv_timeout(int sock, unsigned int msec) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int ustcomm_setsockopt_snd_timeout(int sock, unsigned int msec); +int ustcomm_setsockopt_snd_timeout(int sock, unsigned int msec) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_UST_COMM_H */ diff --git a/include/ust-dynamic-type.h b/include/ust-dynamic-type.h index 80a80d09..41c37788 100644 --- a/include/ust-dynamic-type.h +++ b/include/ust-dynamic-type.h @@ -25,14 +25,14 @@ enum lttng_ust_dynamic_type { _NR_LTTNG_UST_DYNAMIC_TYPES, }; -__attribute__((visibility("hidden"))) int lttng_ust_dynamic_type_choices(size_t *nr_choices, - struct lttng_ust_event_field ***choices); + struct lttng_ust_event_field ***choices) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct lttng_ust_event_field *lttng_ust_dynamic_type_field(int64_t value); +struct lttng_ust_event_field *lttng_ust_dynamic_type_field(int64_t value) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct lttng_ust_event_field *lttng_ust_dynamic_type_tag_field(void); +struct lttng_ust_event_field *lttng_ust_dynamic_type_tag_field(void) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_UST_DYNAMIC_TYPE_H */ diff --git a/include/ust-share.h b/include/ust-share.h index 6f93cdfd..e0ee0958 100644 --- a/include/ust-share.h +++ b/include/ust-share.h @@ -10,13 +10,13 @@ #include #include -__attribute__((visibility("hidden"))) -ssize_t ust_patient_write(int fd, const void *buf, size_t count); +ssize_t ust_patient_write(int fd, const void *buf, size_t count) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -ssize_t ust_patient_writev(int fd, struct iovec *iov, int iovcnt); +ssize_t ust_patient_writev(int fd, struct iovec *iov, int iovcnt) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -ssize_t ust_patient_send(int fd, const void *buf, size_t count, int flags); +ssize_t ust_patient_send(int fd, const void *buf, size_t count, int flags) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_SHARE_H */ diff --git a/include/ust-snprintf.h b/include/ust-snprintf.h index da932139..3f663894 100644 --- a/include/ust-snprintf.h +++ b/include/ust-snprintf.h @@ -10,11 +10,11 @@ #include #include -__attribute__((visibility("hidden"))) -int ust_safe_vsnprintf(char *str, size_t n, const char *fmt, va_list ap); +int ust_safe_vsnprintf(char *str, size_t n, const char *fmt, va_list ap) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int ust_safe_snprintf(char *str, size_t n, const char *fmt, ...) - __attribute__ ((format (printf, 3, 4))); + __attribute__((visibility("hidden"))) + __attribute__((format(printf, 3, 4))); #endif /* UST_SNPRINTF */ diff --git a/include/usterr-signal-safe.h b/include/usterr-signal-safe.h index 50137617..6123c0b3 100644 --- a/include/usterr-signal-safe.h +++ b/include/usterr-signal-safe.h @@ -24,11 +24,11 @@ enum ust_err_loglevel { UST_ERR_LOGLEVEL_DEBUG, }; -__attribute__((visibility("hidden"))) -extern volatile enum ust_err_loglevel ust_err_loglevel; +extern volatile enum ust_err_loglevel ust_err_loglevel + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void ust_err_init(void); +void ust_err_init(void) + __attribute__((visibility("hidden"))); #ifdef LTTNG_UST_DEBUG static inline bool ust_err_debug_enabled(void) diff --git a/libcounter/counter.h b/libcounter/counter.h index 3d11f132..aa86f158 100644 --- a/libcounter/counter.h +++ b/libcounter/counter.h @@ -14,7 +14,6 @@ #include "counter-types.h" /* max_nr_elem is for each dimension. */ -__attribute__((visibility("hidden"))) struct lib_counter *lttng_counter_create(const struct lib_counter_config *config, size_t nr_dimensions, const size_t *max_nr_elem, @@ -22,39 +21,41 @@ struct lib_counter *lttng_counter_create(const struct lib_counter_config *config int global_counter_fd, int nr_counter_cpu_fds, const int *counter_cpu_fds, - bool is_daemon); -__attribute__((visibility("hidden"))) -void lttng_counter_destroy(struct lib_counter *counter); + bool is_daemon) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_counter_set_global_shm(struct lib_counter *counter, int fd); +void lttng_counter_destroy(struct lib_counter *counter) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_counter_set_cpu_shm(struct lib_counter *counter, int cpu, int fd); +int lttng_counter_set_global_shm(struct lib_counter *counter, int fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_counter_get_global_shm(struct lib_counter *counter, int *fd, size_t *len); +int lttng_counter_set_cpu_shm(struct lib_counter *counter, int cpu, int fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_counter_get_cpu_shm(struct lib_counter *counter, int cpu, int *fd, size_t *len); +int lttng_counter_get_global_shm(struct lib_counter *counter, int *fd, size_t *len) + __attribute__((visibility("hidden"))); + +int lttng_counter_get_cpu_shm(struct lib_counter *counter, int cpu, int *fd, size_t *len) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_counter_read(const struct lib_counter_config *config, struct lib_counter *counter, const size_t *dimension_indexes, int cpu, int64_t *value, - bool *overflow, bool *underflow); + bool *overflow, bool *underflow) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_counter_aggregate(const struct lib_counter_config *config, struct lib_counter *counter, const size_t *dimension_indexes, int64_t *value, - bool *overflow, bool *underflow); + bool *overflow, bool *underflow) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_counter_clear(const struct lib_counter_config *config, struct lib_counter *counter, - const size_t *dimension_indexes); + const size_t *dimension_indexes) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_COUNTER_H */ diff --git a/libcounter/shm.h b/libcounter/shm.h index 7be88605..8ec251d7 100644 --- a/libcounter/shm.h +++ b/libcounter/shm.h @@ -24,8 +24,8 @@ int lttng_counter_handle_add_cpu(struct lttng_counter_shm_handle *handle, int shm_fd, uint32_t cpu_nr, uint64_t memory_map_size); -__attribute__((visibility("hidden"))) -unsigned int lttng_counter_handle_get_nr_cpus(struct lttng_counter_shm_handle *handle); +unsigned int lttng_counter_handle_get_nr_cpus(struct lttng_counter_shm_handle *handle) + __attribute__((visibility("hidden"))); /* * Pointer dereferencing. We don't trust the shm_ref, so we validate @@ -73,27 +73,27 @@ void _lttng_counter_set_shmp(struct lttng_counter_shm_ref *ref, struct lttng_cou #define lttng_counter_set_shmp(ref, src) _lttng_counter_set_shmp(&(ref)._ref, src) -__attribute__((visibility("hidden"))) -struct lttng_counter_shm_object_table *lttng_counter_shm_object_table_create(size_t max_nb_obj); +struct lttng_counter_shm_object_table *lttng_counter_shm_object_table_create(size_t max_nb_obj) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) struct lttng_counter_shm_object *lttng_counter_shm_object_table_alloc(struct lttng_counter_shm_object_table *table, size_t memory_map_size, enum lttng_counter_shm_object_type type, const int cpu_fd, - int cpu); + int cpu) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) struct lttng_counter_shm_object *lttng_counter_shm_object_table_append_shm(struct lttng_counter_shm_object_table *table, - int shm_fd, size_t memory_map_size); + int shm_fd, size_t memory_map_size) + __attribute__((visibility("hidden"))); /* mem ownership is passed to lttng_counter_shm_object_table_append_mem(). */ -__attribute__((visibility("hidden"))) struct lttng_counter_shm_object *lttng_counter_shm_object_table_append_mem(struct lttng_counter_shm_object_table *table, - void *mem, size_t memory_map_size); + void *mem, size_t memory_map_size) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_counter_shm_object_table_destroy(struct lttng_counter_shm_object_table *table, int consumer); +void lttng_counter_shm_object_table_destroy(struct lttng_counter_shm_object_table *table, int consumer) + __attribute__((visibility("hidden"))); /* * lttng_counter_zalloc_shm - allocate memory within a shm object. @@ -102,11 +102,11 @@ void lttng_counter_shm_object_table_destroy(struct lttng_counter_shm_object_tabl * *NOT* multithread-safe (should be protected by mutex). * Returns a -1, -1 tuple on error. */ -__attribute__((visibility("hidden"))) -struct lttng_counter_shm_ref lttng_counter_zalloc_shm(struct lttng_counter_shm_object *obj, size_t len); +struct lttng_counter_shm_ref lttng_counter_zalloc_shm(struct lttng_counter_shm_object *obj, size_t len) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_counter_align_shm(struct lttng_counter_shm_object *obj, size_t align); +void lttng_counter_align_shm(struct lttng_counter_shm_object *obj, size_t align) + __attribute__((visibility("hidden"))); static inline int lttng_counter_shm_get_shm_fd(struct lttng_counter_shm_handle *handle, struct lttng_counter_shm_ref *ref) diff --git a/libcounter/smp.h b/libcounter/smp.h index 9bfe724c..38eae489 100644 --- a/libcounter/smp.h +++ b/libcounter/smp.h @@ -12,11 +12,11 @@ */ #define LTTNG_COUNTER_PER_CPU_MEM_SIZE 4096 -__attribute__((visibility("hidden"))) -extern int __lttng_counter_num_possible_cpus; +extern int __lttng_counter_num_possible_cpus + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern void _lttng_counter_get_num_possible_cpus(void); +extern void _lttng_counter_get_num_possible_cpus(void) + __attribute__((visibility("hidden"))); static inline int lttng_counter_num_possible_cpus(void) diff --git a/liblttng-ust/clock.h b/liblttng-ust/clock.h index 824df431..203cce06 100644 --- a/liblttng-ust/clock.h +++ b/liblttng-ust/clock.h @@ -27,8 +27,8 @@ struct lttng_ust_trace_clock { const char *(*description)(void); }; -__attribute__((visibility("hidden"))) -extern struct lttng_ust_trace_clock *lttng_ust_trace_clock; +extern struct lttng_ust_trace_clock *lttng_ust_trace_clock + __attribute__((visibility("hidden"))); void lttng_ust_clock_init(void); diff --git a/liblttng-ust/context-internal.h b/liblttng-ust/context-internal.h index c018e122..15a69559 100644 --- a/liblttng-ust/context-internal.h +++ b/liblttng-ust/context-internal.h @@ -11,149 +11,149 @@ #include "ust-events-internal.h" #include "ust-context-provider.h" -__attribute__((visibility("hidden"))) -int lttng_context_init_all(struct lttng_ust_ctx **ctx); +int lttng_context_init_all(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_attach_context(struct lttng_ust_abi_context *context_param, union lttng_ust_abi_args *uargs, - struct lttng_ust_ctx **ctx, struct lttng_ust_session *session); + struct lttng_ust_ctx **ctx, struct lttng_ust_session *session) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_find_context(struct lttng_ust_ctx *ctx, const char *name); +int lttng_find_context(struct lttng_ust_ctx *ctx, const char *name) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_get_context_index(struct lttng_ust_ctx *ctx, const char *name); +int lttng_get_context_index(struct lttng_ust_ctx *ctx, const char *name) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct lttng_ust_ctx_field *lttng_append_context(struct lttng_ust_ctx **ctx_p); +struct lttng_ust_ctx_field *lttng_append_context(struct lttng_ust_ctx **ctx_p) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_update(struct lttng_ust_ctx *ctx); +void lttng_context_update(struct lttng_ust_ctx *ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) void lttng_remove_context_field(struct lttng_ust_ctx **ctx_p, - struct lttng_ust_ctx_field *field); + struct lttng_ust_ctx_field *field) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_destroy_context(struct lttng_ust_ctx *ctx); +void lttng_destroy_context(struct lttng_ust_ctx *ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_context_add_rcu(struct lttng_ust_ctx **ctx_p, - struct lttng_ust_ctx_field *f); + struct lttng_ust_ctx_field *f) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_context_is_app(const char *name); +int lttng_context_is_app(const char *name) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_vtid_reset(void); +void lttng_context_vtid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_vpid_reset(void); +void lttng_context_vpid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_cgroup_ns_reset(void); +void lttng_context_cgroup_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_ipc_ns_reset(void); +void lttng_context_ipc_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_mnt_ns_reset(void); +void lttng_context_mnt_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_net_ns_reset(void); +void lttng_context_net_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_pid_ns_reset(void); +void lttng_context_pid_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_user_ns_reset(void); +void lttng_context_user_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_uts_ns_reset(void); +void lttng_context_uts_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_time_ns_reset(void); +void lttng_context_time_ns_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_vuid_reset(void); +void lttng_context_vuid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_veuid_reset(void); +void lttng_context_veuid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_vsuid_reset(void); +void lttng_context_vsuid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_vgid_reset(void); +void lttng_context_vgid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_vegid_reset(void); +void lttng_context_vegid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_context_vsgid_reset(void); +void lttng_context_vsgid_reset(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_vtid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_vtid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_vpid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_vpid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_pthread_id_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_pthread_id_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_procname_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_procname_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_ip_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_ip_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_cpu_id_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_cpu_id_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_dyntest_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_dyntest_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_cgroup_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_cgroup_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_ipc_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_ipc_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_mnt_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_mnt_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_net_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_net_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_pid_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_pid_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_user_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_user_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_uts_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_uts_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_time_ns_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_time_ns_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_vuid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_vuid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_veuid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_veuid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_vsuid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_vsuid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_vgid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_vgid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_vegid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_vegid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_add_vsgid_to_ctx(struct lttng_ust_ctx **ctx); +int lttng_add_vsgid_to_ctx(struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_UST_CONTEXT_INTERNAL_H */ diff --git a/liblttng-ust/context-provider-internal.h b/liblttng-ust/context-provider-internal.h index 1454b397..b129153b 100644 --- a/liblttng-ust/context-provider-internal.h +++ b/liblttng-ust/context-provider-internal.h @@ -10,13 +10,13 @@ #include #include -__attribute__((visibility("hidden"))) void lttng_ust_context_set_event_notifier_group_provider(const char *name, size_t (*get_size)(struct lttng_ust_ctx_field *field, size_t offset), void (*record)(struct lttng_ust_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, struct lttng_ust_channel_buffer *chan), void (*get_value)(struct lttng_ust_ctx_field *field, - struct lttng_ust_ctx_value *value)); + struct lttng_ust_ctx_value *value)) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_UST_CONTEXT_PROVIDER_INTERNAL_H */ diff --git a/liblttng-ust/futex.h b/liblttng-ust/futex.h index 95e3aa15..18c46a13 100644 --- a/liblttng-ust/futex.h +++ b/liblttng-ust/futex.h @@ -35,13 +35,13 @@ extern "C" { * (returns EINTR). */ -__attribute__((visibility("hidden"))) extern int lttng_ust_compat_futex_noasync(int32_t *uaddr, int op, int32_t val, - const struct timespec *timeout, int32_t *uaddr2, int32_t val3); + const struct timespec *timeout, int32_t *uaddr2, int32_t val3) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern int lttng_ust_compat_futex_async(int32_t *uaddr, int op, int32_t val, - const struct timespec *timeout, int32_t *uaddr2, int32_t val3); + const struct timespec *timeout, int32_t *uaddr2, int32_t val3) + __attribute__((visibility("hidden"))); #if (defined(__linux__) && defined(__NR_futex)) diff --git a/liblttng-ust/getenv.h b/liblttng-ust/getenv.h index a5dffb24..61d49193 100644 --- a/liblttng-ust/getenv.h +++ b/liblttng-ust/getenv.h @@ -16,10 +16,10 @@ * lttng-ust) */ -__attribute__((visibility("hidden"))) -char *lttng_ust_getenv(const char *name); +char *lttng_ust_getenv(const char *name) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_getenv_init(void); +void lttng_ust_getenv_init(void) + __attribute__((visibility("hidden"))); #endif /* _COMPAT_GETENV_H */ diff --git a/liblttng-ust/lttng-bytecode.h b/liblttng-ust/lttng-bytecode.h index 846d11a4..29ae7b20 100644 --- a/liblttng-ust/lttng-bytecode.h +++ b/liblttng-ust/lttng-bytecode.h @@ -315,27 +315,27 @@ struct lttng_interpreter_output { } u; }; -__attribute__((visibility("hidden"))) -const char *lttng_bytecode_print_op(enum bytecode_op op); +const char *lttng_bytecode_print_op(enum bytecode_op op) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_bytecode_sync_state(struct lttng_ust_bytecode_runtime *runtime); +void lttng_bytecode_sync_state(struct lttng_ust_bytecode_runtime *runtime) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_bytecode_validate(struct bytecode_runtime *bytecode); +int lttng_bytecode_validate(struct bytecode_runtime *bytecode) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_bytecode_specialize(struct lttng_ust_event_desc *event_desc, - struct bytecode_runtime *bytecode); + struct bytecode_runtime *bytecode) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_bytecode_interpret_error(struct lttng_ust_bytecode_runtime *bytecode_runtime, const char *stack_data, - void *ctx); + void *ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_bytecode_interpret(struct lttng_ust_bytecode_runtime *bytecode_runtime, const char *stack_data, - void *ctx); + void *ctx) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_BYTECODE_H */ diff --git a/liblttng-ust/lttng-counter-client.h b/liblttng-ust/lttng-counter-client.h index dcb01de5..2a0a3455 100644 --- a/liblttng-ust/lttng-counter-client.h +++ b/liblttng-ust/lttng-counter-client.h @@ -17,13 +17,16 @@ 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); +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) + __attribute__((visibility("hidden"))); #endif diff --git a/liblttng-ust/lttng-rb-clients.h b/liblttng-ust/lttng-rb-clients.h index 4ebc0dee..9cec72e8 100644 --- a/liblttng-ust/lttng-rb-clients.h +++ b/liblttng-ust/lttng-rb-clients.h @@ -47,35 +47,48 @@ struct lttng_ust_client_lib_ring_buffer_client_cb { void lttng_ust_ring_buffer_clients_init(void); void lttng_ust_ring_buffer_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); +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) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_RB_CLIENT_H */ diff --git a/liblttng-ust/lttng-tracer-core.h b/liblttng-ust/lttng-tracer-core.h index 668d2a89..669e877d 100644 --- a/liblttng-ust/lttng-tracer-core.h +++ b/liblttng-ust/lttng-tracer-core.h @@ -33,95 +33,96 @@ struct lttng_ust_event_recorder; struct lttng_ust_event_notifier; struct lttng_ust_notification_ctx; -__attribute__((visibility("hidden"))) -int ust_lock(void) __attribute__ ((warn_unused_result)); +int ust_lock(void) __attribute__ ((warn_unused_result)) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void ust_lock_nocheck(void); +void ust_lock_nocheck(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void ust_unlock(void); +void ust_unlock(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_fixup_tls(void); +void lttng_ust_fixup_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_event_tls(void); +void lttng_fixup_event_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_vtid_tls(void); +void lttng_fixup_vtid_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_procname_tls(void); +void lttng_fixup_procname_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_cgroup_ns_tls(void); +void lttng_fixup_cgroup_ns_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_ipc_ns_tls(void); +void lttng_fixup_ipc_ns_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_net_ns_tls(void); +void lttng_fixup_net_ns_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_time_ns_tls(void); +void lttng_fixup_time_ns_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_fixup_uts_ns_tls(void); +void lttng_fixup_uts_ns_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_fixup_fd_tracker_tls(void); +void lttng_ust_fixup_fd_tracker_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -const char *lttng_ust_obj_get_name(int id); +const char *lttng_ust_obj_get_name(int id) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_get_notify_socket(void *owner); +int lttng_get_notify_socket(void *owner) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -char* lttng_ust_sockinfo_get_procname(void *owner); +char* lttng_ust_sockinfo_get_procname(void *owner) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_sockinfo_session_enabled(void *owner); +void lttng_ust_sockinfo_session_enabled(void *owner) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -ssize_t lttng_ust_read(int fd, void *buf, size_t len); +ssize_t lttng_ust_read(int fd, void *buf, size_t len) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field, size_t offset); +size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field, size_t offset) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field, struct lttng_ust_lib_ring_buffer_ctx *ctx, - struct lttng_ust_channel_buffer *chan); -__attribute__((visibility("hidden"))) + struct lttng_ust_channel_buffer *chan) + __attribute__((visibility("hidden"))); + void lttng_ust_dummy_get_value(struct lttng_ust_ctx_field *field, - struct lttng_ust_ctx_value *value); + struct lttng_ust_ctx_value *value) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) void lttng_event_notifier_notification_send( struct lttng_ust_event_notifier *event_notifier, const char *stack_data, - struct lttng_ust_notification_ctx *notif_ctx); + struct lttng_ust_notification_ctx *notif_ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct lttng_counter_transport *lttng_counter_transport_find(const char *name); +struct lttng_counter_transport *lttng_counter_transport_find(const char *name) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_counter_transport_register(struct lttng_counter_transport *transport); +void lttng_counter_transport_register(struct lttng_counter_transport *transport) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_counter_transport_unregister(struct lttng_counter_transport *transport); +void lttng_counter_transport_unregister(struct lttng_counter_transport *transport) + __attribute__((visibility("hidden"))); #ifdef HAVE_LINUX_PERF_EVENT_H -__attribute__((visibility("hidden"))) -void lttng_ust_fixup_perf_counter_tls(void); +void lttng_ust_fixup_perf_counter_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_perf_lock(void); +void lttng_perf_lock(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_perf_unlock(void); +void lttng_perf_unlock(void) + __attribute__((visibility("hidden"))); #else /* #ifdef HAVE_LINUX_PERF_EVENT_H */ static inline void lttng_ust_fixup_perf_counter_tls(void) diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 77d2a06f..b3997225 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -785,7 +785,8 @@ long lttng_event_notifier_group_error_counter_cmd(int objd, unsigned int cmd, un return ret; } -__attribute__((visibility("hidden"))) +int lttng_release_event_notifier_group_error_counter(int objd) + __attribute__((visibility("hidden"))); int lttng_release_event_notifier_group_error_counter(int objd) { struct lttng_counter *counter = objd_private(objd); diff --git a/liblttng-ust/lttng-ust-statedump.h b/liblttng-ust/lttng-ust-statedump.h index 059aac93..cc13b38f 100644 --- a/liblttng-ust/lttng-ust-statedump.h +++ b/liblttng-ust/lttng-ust-statedump.h @@ -10,13 +10,13 @@ #include -__attribute__((visibility("hidden"))) -void lttng_ust_statedump_init(void); +void lttng_ust_statedump_init(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_statedump_destroy(void); +void lttng_ust_statedump_destroy(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int do_lttng_ust_statedump(void *owner); +int do_lttng_ust_statedump(void *owner) + __attribute__((visibility("hidden"))); #endif /* LTTNG_UST_STATEDUMP_H */ diff --git a/liblttng-ust/rculfhash-internal.h b/liblttng-ust/rculfhash-internal.h index 2725008b..26971580 100644 --- a/liblttng-ust/rculfhash-internal.h +++ b/liblttng-ust/rculfhash-internal.h @@ -125,14 +125,14 @@ struct lttng_ust_lfht { */ }; -__attribute__((visibility("hidden"))) -extern unsigned int lttng_ust_lfht_fls_ulong(unsigned long x); +extern unsigned int lttng_ust_lfht_fls_ulong(unsigned long x) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern int lttng_ust_lfht_get_count_order_u32(uint32_t x); +extern int lttng_ust_lfht_get_count_order_u32(uint32_t x) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern int lttng_ust_lfht_get_count_order_ulong(unsigned long x); +extern int lttng_ust_lfht_get_count_order_ulong(unsigned long x) + __attribute__((visibility("hidden"))); #ifdef POISON_FREE #define poison_free(ptr) \ diff --git a/liblttng-ust/rculfhash.h b/liblttng-ust/rculfhash.h index 902618e5..6ac20409 100644 --- a/liblttng-ust/rculfhash.h +++ b/liblttng-ust/rculfhash.h @@ -96,14 +96,14 @@ struct lttng_ust_lfht_mm_type { unsigned long index); }; -__attribute__((visibility("hidden"))) -extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_order; +extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_order + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_chunk; +extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_chunk + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_mmap; +extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_mmap + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_new - allocate a hash table. @@ -122,12 +122,12 @@ extern const struct lttng_ust_lfht_mm_type lttng_ust_lfht_mm_mmap; * Return NULL on error. * Note: the RCU flavor must be already included before the hash table header. */ -__attribute__((visibility("hidden"))) extern struct lttng_ust_lfht *lttng_ust_lfht_new(unsigned long init_size, unsigned long min_nr_alloc_buckets, unsigned long max_nr_buckets, int flags, - const struct lttng_ust_lfht_mm_type *mm); + const struct lttng_ust_lfht_mm_type *mm) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_destroy - destroy a hash table. @@ -146,8 +146,8 @@ extern struct lttng_ust_lfht *lttng_ust_lfht_new(unsigned long init_size, * thread to handle resize operations, which removes RCU requirements on * lttng_ust_lfht_destroy. */ -__attribute__((visibility("hidden"))) -extern int lttng_ust_lfht_destroy(struct lttng_ust_lfht *ht); +extern int lttng_ust_lfht_destroy(struct lttng_ust_lfht *ht) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_count_nodes - count the number of nodes in the hash table. @@ -159,11 +159,11 @@ extern int lttng_ust_lfht_destroy(struct lttng_ust_lfht *ht); * Call with rcu_read_lock held. * Threads calling this API need to be registered RCU read-side threads. */ -__attribute__((visibility("hidden"))) extern void lttng_ust_lfht_count_nodes(struct lttng_ust_lfht *ht, long *split_count_before, unsigned long *count, - long *split_count_after); + long *split_count_after) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_lookup - lookup a node by key. @@ -177,10 +177,10 @@ extern void lttng_ust_lfht_count_nodes(struct lttng_ust_lfht *ht, * Threads calling this API need to be registered RCU read-side threads. * This function acts as a rcu_dereference() to read the node pointer. */ -__attribute__((visibility("hidden"))) extern void lttng_ust_lfht_lookup(struct lttng_ust_lfht *ht, unsigned long hash, lttng_ust_lfht_match_fct match, const void *key, - struct lttng_ust_lfht_iter *iter); + struct lttng_ust_lfht_iter *iter) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_next_duplicate - get the next item with same key, after iterator. @@ -202,10 +202,10 @@ extern void lttng_ust_lfht_lookup(struct lttng_ust_lfht *ht, unsigned long hash, * Threads calling this API need to be registered RCU read-side threads. * This function acts as a rcu_dereference() to read the node pointer. */ -__attribute__((visibility("hidden"))) extern void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht, lttng_ust_lfht_match_fct match, const void *key, - struct lttng_ust_lfht_iter *iter); + struct lttng_ust_lfht_iter *iter) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_first - get the first node in the table. @@ -217,8 +217,8 @@ extern void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht, * Threads calling this API need to be registered RCU read-side threads. * This function acts as a rcu_dereference() to read the node pointer. */ -__attribute__((visibility("hidden"))) -extern void lttng_ust_lfht_first(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter); +extern void lttng_ust_lfht_first(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_next - get the next node in the table. @@ -232,8 +232,8 @@ extern void lttng_ust_lfht_first(struct lttng_ust_lfht *ht, struct lttng_ust_lfh * Threads calling this API need to be registered RCU read-side threads. * This function acts as a rcu_dereference() to read the node pointer. */ -__attribute__((visibility("hidden"))) -extern void lttng_ust_lfht_next(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter); +extern void lttng_ust_lfht_next(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_add - add a node to the hash table. @@ -247,9 +247,9 @@ extern void lttng_ust_lfht_next(struct lttng_ust_lfht *ht, struct lttng_ust_lfht * This function issues a full memory barrier before and after its * atomic commit. */ -__attribute__((visibility("hidden"))) extern void lttng_ust_lfht_add(struct lttng_ust_lfht *ht, unsigned long hash, - struct lttng_ust_lfht_node *node); + struct lttng_ust_lfht_node *node) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_add_unique - add a node to hash table, if key is not present. @@ -278,12 +278,12 @@ extern void lttng_ust_lfht_add(struct lttng_ust_lfht *ht, unsigned long hash, * node pointer. The failure case does not guarantee any other memory * barrier. */ -__attribute__((visibility("hidden"))) extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_unique(struct lttng_ust_lfht *ht, unsigned long hash, lttng_ust_lfht_match_fct match, const void *key, - struct lttng_ust_lfht_node *node); + struct lttng_ust_lfht_node *node) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_add_replace - replace or add a node within hash table. @@ -315,12 +315,12 @@ extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_unique(struct lttng_ust_lf * This function issues a full memory barrier before and after its * atomic commit. */ -__attribute__((visibility("hidden"))) extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_replace(struct lttng_ust_lfht *ht, unsigned long hash, lttng_ust_lfht_match_fct match, const void *key, - struct lttng_ust_lfht_node *node); + struct lttng_ust_lfht_node *node) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_replace - replace a node pointed to by iter within hash table. @@ -351,13 +351,13 @@ extern struct lttng_ust_lfht_node *lttng_ust_lfht_add_replace(struct lttng_ust_l * after its atomic commit. Upon failure, this function does not issue * any memory barrier. */ -__attribute__((visibility("hidden"))) extern int lttng_ust_lfht_replace(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *old_iter, unsigned long hash, lttng_ust_lfht_match_fct match, const void *key, - struct lttng_ust_lfht_node *new_node); + struct lttng_ust_lfht_node *new_node) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_del - remove node pointed to by iterator from hash table. @@ -380,8 +380,8 @@ extern int lttng_ust_lfht_replace(struct lttng_ust_lfht *ht, * after its atomic commit. Upon failure, this function does not issue * any memory barrier. */ -__attribute__((visibility("hidden"))) -extern int lttng_ust_lfht_del(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_node *node); +extern int lttng_ust_lfht_del(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_node *node) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_is_node_deleted - query whether a node is removed from hash table. @@ -396,8 +396,8 @@ extern int lttng_ust_lfht_del(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_n * Threads calling this API need to be registered RCU read-side threads. * This function does not issue any memory barrier. */ -__attribute__((visibility("hidden"))) -extern int lttng_ust_lfht_is_node_deleted(const struct lttng_ust_lfht_node *node); +extern int lttng_ust_lfht_is_node_deleted(const struct lttng_ust_lfht_node *node) + __attribute__((visibility("hidden"))); /* * lttng_ust_lfht_resize - Force a hash table resize @@ -409,8 +409,8 @@ extern int lttng_ust_lfht_is_node_deleted(const struct lttng_ust_lfht_node *node * lttng_ust_lfht_resize should *not* be called from a RCU read-side critical * section. */ -__attribute__((visibility("hidden"))) -extern void lttng_ust_lfht_resize(struct lttng_ust_lfht *ht, unsigned long new_size); +extern void lttng_ust_lfht_resize(struct lttng_ust_lfht *ht, unsigned long new_size) + __attribute__((visibility("hidden"))); /* * Note: it is safe to perform element removal (del), replacement, or diff --git a/liblttng-ust/string-utils.h b/liblttng-ust/string-utils.h index 21860529..a2ee531a 100644 --- a/liblttng-ust/string-utils.h +++ b/liblttng-ust/string-utils.h @@ -10,14 +10,14 @@ #include #include -__attribute__((visibility("hidden"))) -bool strutils_is_star_glob_pattern(const char *pattern); +bool strutils_is_star_glob_pattern(const char *pattern) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern); +bool strutils_is_star_at_the_end_only_glob_pattern(const char *pattern) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) bool strutils_star_glob_match(const char *pattern, size_t pattern_len, - const char *candidate, size_t candidate_len); + const char *candidate, size_t candidate_len) + __attribute__((visibility("hidden"))); #endif /* _STRING_UTILS_H */ diff --git a/liblttng-ust/tracepoint-internal.h b/liblttng-ust/tracepoint-internal.h index 26473b33..a4f8fc42 100644 --- a/liblttng-ust/tracepoint-internal.h +++ b/liblttng-ust/tracepoint-internal.h @@ -20,27 +20,27 @@ struct tracepoint_lib { struct cds_list_head callsites; }; -__attribute__((visibility("hidden"))) int tracepoint_probe_register_noupdate(const char *name, void (*callback)(void), void *priv, - const char *signature); + const char *signature) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int tracepoint_probe_unregister_noupdate(const char *name, - void (*callback)(void), void *priv); + void (*callback)(void), void *priv) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void tracepoint_probe_update_all(void); +void tracepoint_probe_update_all(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void *lttng_ust_tp_check_weak_hidden1(void); +void *lttng_ust_tp_check_weak_hidden1(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void *lttng_ust_tp_check_weak_hidden2(void); +void *lttng_ust_tp_check_weak_hidden2(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void *lttng_ust_tp_check_weak_hidden3(void); +void *lttng_ust_tp_check_weak_hidden3(void) + __attribute__((visibility("hidden"))); /* * These symbols are ABI between liblttng-ust-tracepoint and liblttng-ust, diff --git a/liblttng-ust/ust-events-internal.h b/liblttng-ust/ust-events-internal.h index 055e4f6e..daf72b9d 100644 --- a/liblttng-ust/ust-events-internal.h +++ b/liblttng-ust/ust-events-internal.h @@ -597,57 +597,57 @@ struct lttng_enabler *lttng_event_notifier_enabler_as_enabler( * On success, returns a `struct lttng_event_enabler`, * On memory error, returns NULL. */ -__attribute__((visibility("hidden"))) struct lttng_event_enabler *lttng_event_enabler_create( enum lttng_enabler_format_type format_type, struct lttng_ust_abi_event *event_param, - struct lttng_ust_channel_buffer *chan); + struct lttng_ust_channel_buffer *chan) + __attribute__((visibility("hidden"))); /* * Destroy a `struct lttng_event_enabler` object. */ -__attribute__((visibility("hidden"))) -void lttng_event_enabler_destroy(struct lttng_event_enabler *enabler); +void lttng_event_enabler_destroy(struct lttng_event_enabler *enabler) + __attribute__((visibility("hidden"))); /* * Enable a `struct lttng_event_enabler` object and all events related to this * enabler. */ -__attribute__((visibility("hidden"))) -int lttng_event_enabler_enable(struct lttng_event_enabler *enabler); +int lttng_event_enabler_enable(struct lttng_event_enabler *enabler) + __attribute__((visibility("hidden"))); /* * Disable a `struct lttng_event_enabler` object and all events related to this * enabler. */ -__attribute__((visibility("hidden"))) -int lttng_event_enabler_disable(struct lttng_event_enabler *enabler); +int lttng_event_enabler_disable(struct lttng_event_enabler *enabler) + __attribute__((visibility("hidden"))); /* * Attach filter bytecode program to `struct lttng_event_enabler` and all * events related to this enabler. */ -__attribute__((visibility("hidden"))) int lttng_event_enabler_attach_filter_bytecode( struct lttng_event_enabler *enabler, - struct lttng_ust_bytecode_node **bytecode); + struct lttng_ust_bytecode_node **bytecode) + __attribute__((visibility("hidden"))); /* * Attach an application context to an event enabler. * * Not implemented. */ -__attribute__((visibility("hidden"))) int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler, - struct lttng_ust_abi_context *ctx); + struct lttng_ust_abi_context *ctx) + __attribute__((visibility("hidden"))); /* * Attach exclusion list to `struct lttng_event_enabler` and all * events related to this enabler. */ -__attribute__((visibility("hidden"))) int lttng_event_enabler_attach_exclusion(struct lttng_event_enabler *enabler, - struct lttng_ust_excluder_node **excluder); + struct lttng_ust_excluder_node **excluder) + __attribute__((visibility("hidden"))); /* * Synchronize bytecodes for the enabler and the instance (event or @@ -656,11 +656,11 @@ int lttng_event_enabler_attach_exclusion(struct lttng_event_enabler *enabler, * This function goes over all bytecode programs of the enabler (event or * event_notifier enabler) to ensure each is linked to the provided instance. */ -__attribute__((visibility("hidden"))) void lttng_enabler_link_bytecode(struct lttng_ust_event_desc *event_desc, struct lttng_ust_ctx **ctx, struct cds_list_head *instance_bytecode_runtime_head, - struct cds_list_head *enabler_bytecode_runtime_head); + struct cds_list_head *enabler_bytecode_runtime_head) + __attribute__((visibility("hidden"))); /* * Allocate and initialize a `struct lttng_event_notifier_group` object. @@ -668,15 +668,15 @@ void lttng_enabler_link_bytecode(struct lttng_ust_event_desc *event_desc, * On success, returns a `struct lttng_triggre_group`, * on memory error, returns NULL. */ -__attribute__((visibility("hidden"))) -struct lttng_event_notifier_group *lttng_event_notifier_group_create(void); +struct lttng_event_notifier_group *lttng_event_notifier_group_create(void) + __attribute__((visibility("hidden"))); /* * Destroy a `struct lttng_event_notifier_group` object. */ -__attribute__((visibility("hidden"))) void lttng_event_notifier_group_destroy( - struct lttng_event_notifier_group *event_notifier_group); + struct lttng_event_notifier_group *event_notifier_group) + __attribute__((visibility("hidden"))); /* * Allocate and initialize a `struct lttng_event_notifier_enabler` object. @@ -684,90 +684,90 @@ void lttng_event_notifier_group_destroy( * On success, returns a `struct lttng_event_notifier_enabler`, * On memory error, returns NULL. */ -__attribute__((visibility("hidden"))) struct lttng_event_notifier_enabler *lttng_event_notifier_enabler_create( struct lttng_event_notifier_group *event_notifier_group, enum lttng_enabler_format_type format_type, - struct lttng_ust_abi_event_notifier *event_notifier_param); + struct lttng_ust_abi_event_notifier *event_notifier_param) + __attribute__((visibility("hidden"))); /* * Destroy a `struct lttng_event_notifier_enabler` object. */ -__attribute__((visibility("hidden"))) void lttng_event_notifier_enabler_destroy( - struct lttng_event_notifier_enabler *event_notifier_enabler); + struct lttng_event_notifier_enabler *event_notifier_enabler) + __attribute__((visibility("hidden"))); /* * Enable a `struct lttng_event_notifier_enabler` object and all event * notifiers related to this enabler. */ -__attribute__((visibility("hidden"))) int lttng_event_notifier_enabler_enable( - struct lttng_event_notifier_enabler *event_notifier_enabler); + struct lttng_event_notifier_enabler *event_notifier_enabler) + __attribute__((visibility("hidden"))); /* * Disable a `struct lttng_event_notifier_enabler` object and all event * notifiers related to this enabler. */ -__attribute__((visibility("hidden"))) int lttng_event_notifier_enabler_disable( - struct lttng_event_notifier_enabler *event_notifier_enabler); + struct lttng_event_notifier_enabler *event_notifier_enabler) + __attribute__((visibility("hidden"))); /* * Attach filter bytecode program to `struct lttng_event_notifier_enabler` and * all event notifiers related to this enabler. */ -__attribute__((visibility("hidden"))) int lttng_event_notifier_enabler_attach_filter_bytecode( struct lttng_event_notifier_enabler *event_notifier_enabler, - struct lttng_ust_bytecode_node **bytecode); + struct lttng_ust_bytecode_node **bytecode) + __attribute__((visibility("hidden"))); /* * Attach capture bytecode program to `struct lttng_event_notifier_enabler` and * all event_notifiers related to this enabler. */ -__attribute__((visibility("hidden"))) int lttng_event_notifier_enabler_attach_capture_bytecode( struct lttng_event_notifier_enabler *event_notifier_enabler, - struct lttng_ust_bytecode_node **bytecode); + struct lttng_ust_bytecode_node **bytecode) + __attribute__((visibility("hidden"))); /* * Attach exclusion list to `struct lttng_event_notifier_enabler` and all * event notifiers related to this enabler. */ -__attribute__((visibility("hidden"))) int lttng_event_notifier_enabler_attach_exclusion( struct lttng_event_notifier_enabler *event_notifier_enabler, - struct lttng_ust_excluder_node **excluder); + struct lttng_ust_excluder_node **excluder) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_free_event_filter_runtime(struct lttng_ust_event_common *event); +void lttng_free_event_filter_runtime(struct lttng_ust_event_common *event) + __attribute__((visibility("hidden"))); /* * Connect the probe on all enablers matching this event description. * Called on library load. */ -__attribute__((visibility("hidden"))) -int lttng_fix_pending_event_notifiers(void); +int lttng_fix_pending_event_notifiers(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) struct lttng_counter *lttng_ust_counter_create( const char *counter_transport_name, - size_t number_dimensions, const struct lttng_counter_dimension *dimensions); + size_t number_dimensions, const struct lttng_counter_dimension *dimensions) + __attribute__((visibility("hidden"))); #ifdef HAVE_LINUX_PERF_EVENT_H -__attribute__((visibility("hidden"))) int lttng_add_perf_counter_to_ctx(uint32_t type, uint64_t config, const char *name, - struct lttng_ust_ctx **ctx); + struct lttng_ust_ctx **ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_perf_counter_init(void); +int lttng_perf_counter_init(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_perf_counter_exit(void); +void lttng_perf_counter_exit(void) + __attribute__((visibility("hidden"))); #else /* #ifdef HAVE_LINUX_PERF_EVENT_H */ @@ -790,64 +790,64 @@ void lttng_perf_counter_exit(void) } #endif /* #else #ifdef HAVE_LINUX_PERF_EVENT_H */ -__attribute__((visibility("hidden"))) -int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list); +int lttng_probes_get_event_list(struct lttng_ust_tracepoint_list *list) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list); +void lttng_probes_prune_event_list(struct lttng_ust_tracepoint_list *list) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_probes_get_field_list(struct lttng_ust_field_list *list); +int lttng_probes_get_field_list(struct lttng_ust_field_list *list) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_probes_prune_field_list(struct lttng_ust_field_list *list); +void lttng_probes_prune_field_list(struct lttng_ust_field_list *list) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) struct lttng_ust_abi_tracepoint_iter * - lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list); + lttng_ust_tracepoint_list_get_iter_next(struct lttng_ust_tracepoint_list *list) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) struct lttng_ust_abi_field_iter * - lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list); + lttng_ust_field_list_get_iter_next(struct lttng_ust_field_list *list) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct lttng_ust_session *lttng_session_create(void); +struct lttng_ust_session *lttng_session_create(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_session_enable(struct lttng_ust_session *session); +int lttng_session_enable(struct lttng_ust_session *session) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_session_disable(struct lttng_ust_session *session); +int lttng_session_disable(struct lttng_ust_session *session) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_session_statedump(struct lttng_ust_session *session); +int lttng_session_statedump(struct lttng_ust_session *session) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_session_destroy(struct lttng_ust_session *session); +void lttng_session_destroy(struct lttng_ust_session *session) + __attribute__((visibility("hidden"))); /* * Called with ust lock held. */ -__attribute__((visibility("hidden"))) -int lttng_session_active(void); +int lttng_session_active(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct cds_list_head *lttng_get_sessions(void); +struct cds_list_head *lttng_get_sessions(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_handle_pending_statedump(void *owner); +void lttng_handle_pending_statedump(void *owner) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_channel_enable(struct lttng_ust_channel_common *lttng_channel); +int lttng_channel_enable(struct lttng_ust_channel_common *lttng_channel) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_channel_disable(struct lttng_ust_channel_common *lttng_channel); +int lttng_channel_disable(struct lttng_ust_channel_common *lttng_channel) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_transport_register(struct lttng_transport *transport); +void lttng_transport_register(struct lttng_transport *transport) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_transport_unregister(struct lttng_transport *transport); +void lttng_transport_unregister(struct lttng_transport *transport) + __attribute__((visibility("hidden"))); /* This is ABI between liblttng-ust and liblttng-ust-ctl */ struct lttng_transport *lttng_ust_transport_find(const char *name); @@ -855,57 +855,57 @@ struct lttng_transport *lttng_ust_transport_find(const char *name); /* This is ABI between liblttng-ust and liblttng-ust-dl */ void lttng_ust_dl_update(void *ip); -__attribute__((visibility("hidden"))) -void lttng_probe_provider_unregister_events(struct lttng_ust_probe_desc *desc); +void lttng_probe_provider_unregister_events(struct lttng_ust_probe_desc *desc) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_fix_pending_events(void); +int lttng_fix_pending_events(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct cds_list_head *lttng_get_probe_list_head(void); +struct cds_list_head *lttng_get_probe_list_head(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) struct lttng_enum *lttng_ust_enum_get_from_desc(struct lttng_ust_session *session, - struct lttng_ust_enum_desc *enum_desc); + struct lttng_ust_enum_desc *enum_desc) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_abi_create_root_handle(void); +int lttng_abi_create_root_handle(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -const struct lttng_ust_abi_objd_ops *lttng_ust_abi_objd_ops(int id); +const struct lttng_ust_abi_objd_ops *lttng_ust_abi_objd_ops(int id) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_ust_abi_objd_unref(int id, int is_owner); +int lttng_ust_abi_objd_unref(int id, int is_owner) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_abi_exit(void); +void lttng_ust_abi_exit(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_abi_events_exit(void); +void lttng_ust_abi_events_exit(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_abi_objd_table_owner_cleanup(void *owner); +void lttng_ust_abi_objd_table_owner_cleanup(void *owner) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -struct lttng_ust_channel_buffer *lttng_ust_alloc_channel_buffer(void); +struct lttng_ust_channel_buffer *lttng_ust_alloc_channel_buffer(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_free_channel_common(struct lttng_ust_channel_common *chan); +void lttng_ust_free_channel_common(struct lttng_ust_channel_common *chan) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_ust_interpret_event_filter(struct lttng_ust_event_common *event, const char *interpreter_stack_data, - void *filter_ctx); + void *filter_ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_ust_session_uuid_validate(struct lttng_ust_session *session, - unsigned char *uuid); + unsigned char *uuid) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -bool lttng_ust_validate_event_name(const struct lttng_ust_event_desc *desc); +bool lttng_ust_validate_event_name(const struct lttng_ust_event_desc *desc) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) void lttng_ust_format_event_name(const struct lttng_ust_event_desc *desc, - char *name); + char *name) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_UST_EVENTS_INTERNAL_H */ diff --git a/libmsgpack/msgpack.h b/libmsgpack/msgpack.h index f75be91a..140ad387 100644 --- a/libmsgpack/msgpack.h +++ b/libmsgpack/msgpack.h @@ -22,49 +22,49 @@ struct lttng_msgpack_writer { uint8_t map_nesting; }; -__attribute__((visibility("hidden"))) void lttng_msgpack_writer_init( struct lttng_msgpack_writer *writer, - uint8_t *buffer, size_t size); + uint8_t *buffer, size_t size) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_msgpack_writer_fini(struct lttng_msgpack_writer *writer); +void lttng_msgpack_writer_fini(struct lttng_msgpack_writer *writer) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_msgpack_write_nil(struct lttng_msgpack_writer *writer); +int lttng_msgpack_write_nil(struct lttng_msgpack_writer *writer) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_msgpack_write_true(struct lttng_msgpack_writer *writer); +int lttng_msgpack_write_true(struct lttng_msgpack_writer *writer) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_msgpack_write_false(struct lttng_msgpack_writer *writer); +int lttng_msgpack_write_false(struct lttng_msgpack_writer *writer) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_msgpack_write_unsigned_integer( - struct lttng_msgpack_writer *writer, uint64_t value); + struct lttng_msgpack_writer *writer, uint64_t value) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_msgpack_write_signed_integer( - struct lttng_msgpack_writer *writer, int64_t value); + struct lttng_msgpack_writer *writer, int64_t value) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_msgpack_write_double(struct lttng_msgpack_writer *writer, double value); +int lttng_msgpack_write_double(struct lttng_msgpack_writer *writer, double value) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_msgpack_write_str(struct lttng_msgpack_writer *writer, - const char *value); + const char *value) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_msgpack_begin_map(struct lttng_msgpack_writer *writer, size_t count); +int lttng_msgpack_begin_map(struct lttng_msgpack_writer *writer, size_t count) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_msgpack_end_map(struct lttng_msgpack_writer *writer); +int lttng_msgpack_end_map(struct lttng_msgpack_writer *writer) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) int lttng_msgpack_begin_array( - struct lttng_msgpack_writer *writer, size_t count); + struct lttng_msgpack_writer *writer, size_t count) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lttng_msgpack_end_array(struct lttng_msgpack_writer *writer); +int lttng_msgpack_end_array(struct lttng_msgpack_writer *writer) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_UST_MSGPACK_H */ diff --git a/libringbuffer/backend.h b/libringbuffer/backend.h index fff4f9ec..80fa2b64 100644 --- a/libringbuffer/backend.h +++ b/libringbuffer/backend.h @@ -23,15 +23,15 @@ /* Ring buffer backend access (read/write) */ -__attribute__((visibility("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); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); /* * Return the address where a given offset is located. @@ -39,17 +39,17 @@ 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. */ -__attribute__((visibility("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); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern void * lib_ring_buffer_read_offset_address(struct lttng_ust_lib_ring_buffer_backend *bufb, size_t offset, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); /** * lib_ring_buffer_write - write data to a buffer backend diff --git a/libringbuffer/backend_internal.h b/libringbuffer/backend_internal.h index 43d83c58..0e5e7940 100644 --- a/libringbuffer/backend_internal.h +++ b/libringbuffer/backend_internal.h @@ -24,48 +24,48 @@ /* Ring buffer and channel backend create/free */ -__attribute__((visibility("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); + struct shm_object *shmobj) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void channel_backend_unregister_notifiers(struct channel_backend *chanb); +void channel_backend_unregister_notifiers(struct channel_backend *chanb) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lib_ring_buffer_backend_free(struct lttng_ust_lib_ring_buffer_backend *bufb); +void lib_ring_buffer_backend_free(struct lttng_ust_lib_ring_buffer_backend *bufb) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + const int *stream_fds) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) void channel_backend_free(struct channel_backend *chanb, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) void lib_ring_buffer_backend_reset(struct lttng_ust_lib_ring_buffer_backend *bufb, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void channel_backend_reset(struct channel_backend *chanb); +void channel_backend_reset(struct channel_backend *chanb) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int lib_ring_buffer_backend_init(void); +int lib_ring_buffer_backend_init(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lib_ring_buffer_backend_exit(void); +void lib_ring_buffer_backend_exit(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + ssize_t pagecpy) + __attribute__((visibility("hidden"))); /* * Subbuffer ID bits for overwrite mode. Need to fit within a single word to be diff --git a/libringbuffer/frontend.h b/libringbuffer/frontend.h index c337eeca..ed255c74 100644 --- a/libringbuffer/frontend.h +++ b/libringbuffer/frontend.h @@ -39,7 +39,6 @@ * for the private data area. */ -__attribute__((visibility("hidden"))) extern struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buffer_config *config, const char *name, @@ -52,16 +51,17 @@ struct lttng_ust_shm_handle *channel_create(const struct lttng_ust_lib_ring_buff unsigned int switch_timer_interval, unsigned int read_timer_interval, const int *stream_fds, int nr_stream_fds, - int64_t blocking_timeout); + int64_t blocking_timeout) + __attribute__((visibility("hidden"))); /* * channel_destroy finalizes all channel's buffers, waits for readers to * release all references, and destroys the channel. */ -__attribute__((visibility("hidden"))) void channel_destroy(struct lttng_ust_lib_ring_buffer_channel *chan, struct lttng_ust_shm_handle *handle, - int consumer); + int consumer) + __attribute__((visibility("hidden"))); /* Buffer read operations */ @@ -75,84 +75,85 @@ void channel_destroy(struct lttng_ust_lib_ring_buffer_channel *chan, #define for_each_channel_cpu(cpu, chan) \ for_each_possible_cpu(cpu) -__attribute__((visibility("hidden"))) extern struct lttng_ust_lib_ring_buffer *channel_get_ring_buffer( const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_channel *chan, int cpu, struct lttng_ust_shm_handle *handle, int *shm_fd, int *wait_fd, int *wakeup_fd, - uint64_t *memory_map_size); + uint64_t *memory_map_size) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern int ring_buffer_channel_close_wait_fd(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_channel *chan, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern int ring_buffer_channel_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_channel *chan, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern int ring_buffer_stream_close_wait_fd(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_channel *chan, struct lttng_ust_shm_handle *handle, - int cpu); + int cpu) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern int ring_buffer_stream_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_config *config, struct lttng_ust_lib_ring_buffer_channel *chan, struct lttng_ust_shm_handle *handle, - int cpu); + int cpu) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern int lib_ring_buffer_open_read(struct lttng_ust_lib_ring_buffer *buf, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern void lib_ring_buffer_release_read(struct lttng_ust_lib_ring_buffer *buf, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); /* * Initialize signals for ring buffer. Should be called early e.g. by * main() in the program to affect all threads. */ -__attribute__((visibility("hidden"))) -void lib_ringbuffer_signal_init(void); +void lib_ringbuffer_signal_init(void) + __attribute__((visibility("hidden"))); /* * Read sequence: snapshot, many get_subbuf/put_subbuf, move_consumer. */ -__attribute__((visibility("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); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern int lib_ring_buffer_get_subbuf(struct lttng_ust_lib_ring_buffer *buf, unsigned long consumed, - struct lttng_ust_shm_handle *handle); -__attribute__((visibility("hidden"))) + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); + extern void lib_ring_buffer_put_subbuf(struct lttng_ust_lib_ring_buffer *buf, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); /* * lib_ring_buffer_get_next_subbuf/lib_ring_buffer_put_next_subbuf are helpers @@ -185,12 +186,12 @@ void lib_ring_buffer_put_next_subbuf(struct lttng_ust_lib_ring_buffer *buf, handle); } -__attribute__((visibility("hidden"))) -extern void channel_reset(struct lttng_ust_lib_ring_buffer_channel *chan); +extern void channel_reset(struct lttng_ust_lib_ring_buffer_channel *chan) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern void lib_ring_buffer_reset(struct lttng_ust_lib_ring_buffer *buf, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); static inline unsigned long lib_ring_buffer_get_offset(const struct lttng_ust_lib_ring_buffer_config *config, diff --git a/libringbuffer/frontend_internal.h b/libringbuffer/frontend_internal.h index c0be36f5..fc0b0535 100644 --- a/libringbuffer/frontend_internal.h +++ b/libringbuffer/frontend_internal.h @@ -147,18 +147,17 @@ int last_tsc_overflow(const struct lttng_ust_lib_ring_buffer_config *config, } #endif -__attribute__((visibility("hidden"))) extern int lib_ring_buffer_reserve_slow(struct lttng_ust_lib_ring_buffer_ctx *ctx, - void *client_ctx); + void *client_ctx) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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 lttng_ust_lib_ring_buffer_channel *chan, @@ -166,7 +165,8 @@ void lib_ring_buffer_check_deliver_slow(const struct lttng_ust_lib_ring_buffer_c unsigned long commit_count, unsigned long idx, struct lttng_ust_shm_handle *handle, - uint64_t tsc); + uint64_t tsc) + __attribute__((visibility("hidden"))); /* Buffer write helpers */ @@ -349,18 +349,18 @@ void lib_ring_buffer_write_commit_counter(const struct lttng_ust_lib_ring_buffer v_set(config, &cc_hot->seq, commit_count); } -__attribute__((visibility("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); + struct shm_object *shmobj) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) extern void lib_ring_buffer_free(struct lttng_ust_lib_ring_buffer *buf, - struct lttng_ust_shm_handle *handle); + struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); /* Keep track of trap nesting inside ring buffer code */ -__attribute__((visibility("hidden"))) -extern DECLARE_URCU_TLS(unsigned int, lib_ring_buffer_nesting); +extern DECLARE_URCU_TLS(unsigned int, lib_ring_buffer_nesting) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_RING_BUFFER_FRONTEND_INTERNAL_H */ diff --git a/libringbuffer/getcpu.h b/libringbuffer/getcpu.h index 701deeb2..52c74413 100644 --- a/libringbuffer/getcpu.h +++ b/libringbuffer/getcpu.h @@ -11,11 +11,11 @@ #include #include -__attribute__((visibility("hidden"))) -void lttng_ust_getcpu_init(void); +void lttng_ust_getcpu_init(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern int (*lttng_get_cpu)(void); +extern int (*lttng_get_cpu)(void) + __attribute__((visibility("hidden"))); #ifdef LTTNG_UST_DEBUG_VALGRIND diff --git a/libringbuffer/nohz.h b/libringbuffer/nohz.h index 011d88e2..5d416780 100644 --- a/libringbuffer/nohz.h +++ b/libringbuffer/nohz.h @@ -8,15 +8,17 @@ #define _LTTNG_RING_BUFFER_NOHZ_H #ifdef CONFIG_LIB_RING_BUFFER -__attribute__((visibility("hidden"))) -void lib_ring_buffer_tick_nohz_flush(void); +void lib_ring_buffer_tick_nohz_flush(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lib_ring_buffer_tick_nohz_stop(void); +void lib_ring_buffer_tick_nohz_stop(void) + __attribute__((visibility("hidden"))); + +void lib_ring_buffer_tick_nohz_restart(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lib_ring_buffer_tick_nohz_restart(void); #else + static inline void lib_ring_buffer_tick_nohz_flush(void) { } diff --git a/libringbuffer/rb-init.h b/libringbuffer/rb-init.h index 7dccebe6..b3eb7568 100644 --- a/libringbuffer/rb-init.h +++ b/libringbuffer/rb-init.h @@ -7,10 +7,10 @@ #ifndef _LTTNG_UST_LIB_RINGBUFFER_RB_INIT_H #define _LTTNG_UST_LIB_RINGBUFFER_RB_INIT_H -__attribute__((visibility("hidden"))) -void lttng_fixup_ringbuffer_tls(void); +void lttng_fixup_ringbuffer_tls(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void lttng_ust_ringbuffer_set_allow_blocking(void); +void lttng_ust_ringbuffer_set_allow_blocking(void) + __attribute__((visibility("hidden"))); #endif /* _LTTNG_UST_LIB_RINGBUFFER_RB_INIT_H */ diff --git a/libringbuffer/shm.h b/libringbuffer/shm.h index 4889d6d6..c3ce4ef8 100644 --- a/libringbuffer/shm.h +++ b/libringbuffer/shm.h @@ -15,20 +15,20 @@ #include "shm_types.h" /* channel_handle_create - for UST. */ -__attribute__((visibility("hidden"))) extern struct lttng_ust_shm_handle *channel_handle_create(void *data, - uint64_t memory_map_size, int wakeup_fd); + uint64_t memory_map_size, int wakeup_fd) + __attribute__((visibility("hidden"))); /* channel_handle_add_stream - for UST. */ -__attribute__((visibility("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); + uint64_t memory_map_size) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -unsigned int channel_handle_get_nr_streams(struct lttng_ust_shm_handle *handle); +unsigned int channel_handle_get_nr_streams(struct lttng_ust_shm_handle *handle) + __attribute__((visibility("hidden"))); /* * Pointer dereferencing. We don't trust the shm_ref, so we validate @@ -71,28 +71,28 @@ void _set_shmp(struct shm_ref *ref, struct shm_ref src) #define set_shmp(ref, src) _set_shmp(&(ref)._ref, src) -__attribute__((visibility("hidden"))) -struct shm_object_table *shm_object_table_create(size_t max_nb_obj); +struct shm_object_table *shm_object_table_create(size_t max_nb_obj) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + int cpu) + __attribute__((visibility("hidden"))); -__attribute__((visibility("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); + size_t memory_map_size) + __attribute__((visibility("hidden"))); /* mem ownership is passed to shm_object_table_append_mem(). */ -__attribute__((visibility("hidden"))) struct shm_object *shm_object_table_append_mem(struct shm_object_table *table, - void *mem, size_t memory_map_size, int wakeup_fd); + void *mem, size_t memory_map_size, int wakeup_fd) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void shm_object_table_destroy(struct shm_object_table *table, int consumer); +void shm_object_table_destroy(struct shm_object_table *table, int consumer) + __attribute__((visibility("hidden"))); /* * zalloc_shm - allocate memory within a shm object. @@ -101,11 +101,11 @@ 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. */ -__attribute__((visibility("hidden"))) -struct shm_ref zalloc_shm(struct shm_object *obj, size_t len); +struct shm_ref zalloc_shm(struct shm_object *obj, size_t len) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void align_shm(struct shm_object *obj, size_t align); +void align_shm(struct shm_object *obj, size_t align) + __attribute__((visibility("hidden"))); static inline int shm_get_wait_fd(struct lttng_ust_shm_handle *handle, struct shm_ref *ref) diff --git a/libringbuffer/smp.h b/libringbuffer/smp.h index 78b1851f..028a66f7 100644 --- a/libringbuffer/smp.h +++ b/libringbuffer/smp.h @@ -15,11 +15,11 @@ */ #define PER_CPU_MEM_SIZE 4096 -__attribute__((visibility("hidden"))) -extern int __num_possible_cpus; +extern int __num_possible_cpus + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern void _get_num_possible_cpus(void); +extern void _get_num_possible_cpus(void) + __attribute__((visibility("hidden"))); static inline int num_possible_cpus(void) diff --git a/snprintf/floatio.h b/snprintf/floatio.h index db4a3c73..deaa1934 100644 --- a/snprintf/floatio.h +++ b/snprintf/floatio.h @@ -31,11 +31,11 @@ #error "floating point buffers too small" #endif -__attribute__((visibility("hidden"))) -char *__hdtoa(double, const char *, int, int *, int *, char **); +char *__hdtoa(double, const char *, int, int *, int *, char **) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -char *__hldtoa(long double, const char *, int, int *, int *, char **); +char *__hldtoa(long double, const char *, int, int *, int *, char **) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -char *__ldtoa(long double *, int, int, int *, int *, char **); +char *__ldtoa(long double *, int, int, int *, int *, char **) + __attribute__((visibility("hidden"))); diff --git a/snprintf/fvwrite.h b/snprintf/fvwrite.h index 42f77a93..3fabf5f5 100644 --- a/snprintf/fvwrite.h +++ b/snprintf/fvwrite.h @@ -25,5 +25,5 @@ struct __lttng_ust_suio { int uio_resid; }; -__attribute__((visibility("hidden"))) -extern int __sfvwrite(LTTNG_UST_LFILE *, struct __lttng_ust_suio *); +extern int __sfvwrite(LTTNG_UST_LFILE *, struct __lttng_ust_suio *) + __attribute__((visibility("hidden"))); diff --git a/snprintf/local.h b/snprintf/local.h index 06e72632..6d71cf53 100644 --- a/snprintf/local.h +++ b/snprintf/local.h @@ -21,56 +21,56 @@ #include "wcio.h" #include "fileext.h" -__attribute__((visibility("hidden"))) -int __sflush(LTTNG_UST_LFILE *); +int __sflush(LTTNG_UST_LFILE *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -LTTNG_UST_LFILE *__sfp(void); +LTTNG_UST_LFILE *__sfp(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int __srefill(LTTNG_UST_LFILE *); +int __srefill(LTTNG_UST_LFILE *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int __sread(void *, char *, int); +int __sread(void *, char *, int) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int __swrite(void *, const char *, int); +int __swrite(void *, const char *, int) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -fpos_t __sseek(void *, fpos_t, int); +fpos_t __sseek(void *, fpos_t, int) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int __sclose(void *); +int __sclose(void *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void __sinit(void); +void __sinit(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void _cleanup(void); +void _cleanup(void) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -void __smakebuf(LTTNG_UST_LFILE *); +void __smakebuf(LTTNG_UST_LFILE *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int __swhatbuf(LTTNG_UST_LFILE *, size_t *, int *); +int __swhatbuf(LTTNG_UST_LFILE *, size_t *, int *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int _fwalk(int (*)(LTTNG_UST_LFILE *)); +int _fwalk(int (*)(LTTNG_UST_LFILE *)) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int __swsetup(LTTNG_UST_LFILE *); +int __swsetup(LTTNG_UST_LFILE *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -int __sflags(const char *, int *); +int __sflags(const char *, int *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -wint_t __fgetwc_unlock(LTTNG_UST_LFILE *); +wint_t __fgetwc_unlock(LTTNG_UST_LFILE *) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern void __atexit_register_cleanup(void (*)(void)); +extern void __atexit_register_cleanup(void (*)(void)) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern int __sdidinit; +extern int __sdidinit + __attribute__((visibility("hidden"))); /* * Return true if the given LTTNG_UST_LFILE cannot be written now. diff --git a/snprintf/various.h b/snprintf/various.h index 4fb3145b..067b1add 100644 --- a/snprintf/various.h +++ b/snprintf/various.h @@ -98,13 +98,13 @@ typedef struct __lttng_ust_sFILE { #define __sferror(p) (((p)->_flags & __SERR) != 0) -__attribute__((visibility("hidden"))) -extern int ust_safe_fflush(LTTNG_UST_LFILE *fp); +extern int ust_safe_fflush(LTTNG_UST_LFILE *fp) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern int ust_safe_vfprintf(LTTNG_UST_LFILE *fp, const char *fmt0, va_list ap); +extern int ust_safe_vfprintf(LTTNG_UST_LFILE *fp, const char *fmt0, va_list ap) + __attribute__((visibility("hidden"))); -__attribute__((visibility("hidden"))) -extern size_t ust_safe_mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps); +extern size_t ust_safe_mbrtowc(wchar_t *pwc, const char *s, size_t n, mbstate_t *ps) + __attribute__((visibility("hidden"))); #endif /* UST_SNPRINTF_VARIOUS_H */