From: Michael Jeanson Date: Fri, 23 Apr 2021 17:56:39 +0000 (-0400) Subject: Rename all 'fixup_tls' functions to 'alloc_tls' X-Git-Tag: v2.13.0-rc1~16 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=a9fd951a21f28704ffdfd4217766f725a217208b;p=lttng-ust.git Rename all 'fixup_tls' functions to 'alloc_tls' Use a term that makes it clearer we are forcing the allocation of lazy allocated TLS variables. Change-Id: I9bba052598ba9a62553043f91128d676b9393e71 Signed-off-by: Michael Jeanson Signed-off-by: Mathieu Desnoyers --- diff --git a/src/common/ringbuffer/rb-init.h b/src/common/ringbuffer/rb-init.h index 83e32c1f..83676051 100644 --- a/src/common/ringbuffer/rb-init.h +++ b/src/common/ringbuffer/rb-init.h @@ -7,7 +7,7 @@ #ifndef _LTTNG_UST_RINGBUFFER_RB_INIT_H #define _LTTNG_UST_RINGBUFFER_RB_INIT_H -void lttng_fixup_ringbuffer_tls(void) +void lttng_ringbuffer_alloc_tls(void) __attribute__((visibility("hidden"))); void lttng_ust_ringbuffer_set_allow_blocking(void) diff --git a/src/common/ringbuffer/ring_buffer_frontend.c b/src/common/ringbuffer/ring_buffer_frontend.c index fa0a984b..62543fa2 100644 --- a/src/common/ringbuffer/ring_buffer_frontend.c +++ b/src/common/ringbuffer/ring_buffer_frontend.c @@ -2558,9 +2558,9 @@ void lib_ring_buffer_check_deliver_slow(const struct lttng_ust_ring_buffer_confi } /* - * Force a read (imply TLS fixup for dlopen) of TLS variables. + * Force a read (imply TLS allocation for dlopen) of TLS variables. */ -void lttng_fixup_ringbuffer_tls(void) +void lttng_ringbuffer_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(lib_ring_buffer_nesting))); } diff --git a/src/common/ust-fd.h b/src/common/ust-fd.h index eb9c525c..b6a078bf 100644 --- a/src/common/ust-fd.h +++ b/src/common/ust-fd.h @@ -26,6 +26,6 @@ int lttng_ust_safe_close_fd(int fd, int (*close_cb)(int)); int lttng_ust_safe_fclose_stream(FILE *stream, int (*fclose_cb)(FILE *stream)); int lttng_ust_safe_closefrom_fd(int lowfd, int (*close_cb)(int)); -void lttng_ust_fixup_fd_tracker_tls(void); +void lttng_ust_fd_tracker_alloc_tls(void); #endif /* _LTTNG_UST_FD_H */ diff --git a/src/lib/lttng-ust-common/fd-tracker.c b/src/lib/lttng-ust-common/fd-tracker.c index 54f7deb4..7a17e2a0 100644 --- a/src/lib/lttng-ust-common/fd-tracker.c +++ b/src/lib/lttng-ust-common/fd-tracker.c @@ -48,7 +48,7 @@ /* * Protect the lttng_fd_set. Nests within the ust_lock, and therefore - * within the libc dl lock. Therefore, we need to fixup the TLS before + * within the libc dl lock. Therefore, we need to allocate the TLS before * nesting into this lock. * * The ust_safe_guard_fd_mutex nests within the ust_mutex. This mutex @@ -77,9 +77,9 @@ static int num_fd_sets; static int init_done; /* - * Force a read (imply TLS fixup for dlopen) of TLS variables. + * Force a read (imply TLS allocation for dlopen) of TLS variables. */ -void lttng_ust_fixup_fd_tracker_tls(void) +void lttng_ust_fd_tracker_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(ust_fd_mutex_nest))); } @@ -323,7 +323,7 @@ int lttng_ust_safe_close_fd(int fd, int (*close_cb)(int fd)) { int ret = 0; - lttng_ust_fixup_fd_tracker_tls(); + lttng_ust_fd_tracker_alloc_tls(); /* * Ensure the tracker is initialized when called from @@ -359,7 +359,7 @@ int lttng_ust_safe_fclose_stream(FILE *stream, int (*fclose_cb)(FILE *stream)) { int ret = 0, fd; - lttng_ust_fixup_fd_tracker_tls(); + lttng_ust_fd_tracker_alloc_tls(); /* * Ensure the tracker is initialized when called from @@ -414,7 +414,7 @@ int lttng_ust_safe_closefrom_fd(int lowfd, int (*close_cb)(int fd)) { int ret = 0, close_success = 0, i; - lttng_ust_fixup_fd_tracker_tls(); + lttng_ust_fd_tracker_alloc_tls(); /* * Ensure the tracker is initialized when called from diff --git a/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c b/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c index e3513db4..3951f5b0 100644 --- a/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c +++ b/src/lib/lttng-ust-libc-wrapper/lttng-ust-malloc.c @@ -426,7 +426,7 @@ int posix_memalign(void **memptr, size_t alignment, size_t size) } static -void lttng_ust_fixup_malloc_nesting_tls(void) +void lttng_ust_malloc_nesting_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(malloc_nesting))); } @@ -437,7 +437,7 @@ void lttng_ust_libc_wrapper_malloc_ctor(void) if (cur_alloc.calloc) { return; } - lttng_ust_fixup_malloc_nesting_tls(); + lttng_ust_malloc_nesting_alloc_tls(); /* * Ensure the allocator is in place before the process becomes * multithreaded. diff --git a/src/lib/lttng-ust/lttng-context-cgroup-ns.c b/src/lib/lttng-ust/lttng-context-cgroup-ns.c index fa67a64c..34523ea1 100644 --- a/src/lib/lttng-ust/lttng-context-cgroup-ns.c +++ b/src/lib/lttng-ust/lttng-context-cgroup-ns.c @@ -153,9 +153,9 @@ error_find_context: } /* - * * Force a read (imply TLS fixup for dlopen) of TLS variables. - * */ -void lttng_fixup_cgroup_ns_tls(void) + * Force a read (imply TLS allocation for dlopen) of TLS variables. + */ +void lttng_cgroup_ns_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(cached_cgroup_ns))); } diff --git a/src/lib/lttng-ust/lttng-context-ipc-ns.c b/src/lib/lttng-ust/lttng-context-ipc-ns.c index f635a230..63401e8d 100644 --- a/src/lib/lttng-ust/lttng-context-ipc-ns.c +++ b/src/lib/lttng-ust/lttng-context-ipc-ns.c @@ -151,9 +151,9 @@ error_find_context: } /* - * * Force a read (imply TLS fixup for dlopen) of TLS variables. - * */ -void lttng_fixup_ipc_ns_tls(void) + * Force a read (imply TLS allocation for dlopen) of TLS variables. + */ +void lttng_ipc_ns_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(cached_ipc_ns))); } diff --git a/src/lib/lttng-ust/lttng-context-net-ns.c b/src/lib/lttng-ust/lttng-context-net-ns.c index 6982a351..960591c2 100644 --- a/src/lib/lttng-ust/lttng-context-net-ns.c +++ b/src/lib/lttng-ust/lttng-context-net-ns.c @@ -151,9 +151,9 @@ error_find_context: } /* - * * Force a read (imply TLS fixup for dlopen) of TLS variables. - * */ -void lttng_fixup_net_ns_tls(void) + * Force a read (imply TLS allocation for dlopen) of TLS variables. + */ +void lttng_net_ns_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(cached_net_ns))); } diff --git a/src/lib/lttng-ust/lttng-context-perf-counters.c b/src/lib/lttng-ust/lttng-context-perf-counters.c index 1d44a54a..233c654c 100644 --- a/src/lib/lttng-ust/lttng-context-perf-counters.c +++ b/src/lib/lttng-ust/lttng-context-perf-counters.c @@ -71,7 +71,7 @@ static pthread_key_t perf_counter_key; * lttng_perf_lock - Protect lttng-ust perf counter data structures * * Nests within the ust_lock, and therefore within the libc dl lock. - * Therefore, we need to fixup the TLS before nesting into this lock. + * Therefore, we need to allocate the TLS before nesting into this lock. * Nests inside RCU bp read-side lock. Protects against concurrent * fork. */ @@ -90,9 +90,9 @@ static int ust_perf_saved_cancelstate; static DEFINE_URCU_TLS(int, ust_perf_mutex_nest); /* - * Force a read (imply TLS fixup for dlopen) of TLS variables. + * Force a read (imply TLS allocation for dlopen) of TLS variables. */ -void lttng_ust_fixup_perf_counter_tls(void) +void lttng_ust_perf_counter_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(ust_perf_mutex_nest))); } diff --git a/src/lib/lttng-ust/lttng-context-procname.c b/src/lib/lttng-ust/lttng-context-procname.c index 28c8490d..80ba9825 100644 --- a/src/lib/lttng-ust/lttng-context-procname.c +++ b/src/lib/lttng-ust/lttng-context-procname.c @@ -120,9 +120,9 @@ error_find_context: } /* - * Force a read (imply TLS fixup for dlopen) of TLS variables. + * Force a read (imply TLS allocation for dlopen) of TLS variables. */ -void lttng_fixup_procname_tls(void) +void lttng_procname_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(cached_procname)[0])); } diff --git a/src/lib/lttng-ust/lttng-context-provider.c b/src/lib/lttng-ust/lttng-context-provider.c index cc437067..796a6b49 100644 --- a/src/lib/lttng-ust/lttng-context-provider.c +++ b/src/lib/lttng-ust/lttng-context-provider.c @@ -72,7 +72,7 @@ struct lttng_ust_registered_context_provider *lttng_ust_context_provider_registe size_t name_len = strlen(provider->name); uint32_t hash; - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); /* Provider name starts with "$app.". */ if (strncmp("$app.", provider->name, strlen("$app.")) != 0) @@ -106,7 +106,7 @@ end: void lttng_ust_context_provider_unregister(struct lttng_ust_registered_context_provider *reg_provider) { - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); if (ust_lock()) goto end; diff --git a/src/lib/lttng-ust/lttng-context-time-ns.c b/src/lib/lttng-ust/lttng-context-time-ns.c index 4f532b48..ec32a1de 100644 --- a/src/lib/lttng-ust/lttng-context-time-ns.c +++ b/src/lib/lttng-ust/lttng-context-time-ns.c @@ -150,9 +150,9 @@ error_find_context: } /* - * * Force a read (imply TLS fixup for dlopen) of TLS variables. - * */ -void lttng_fixup_time_ns_tls(void) + * Force a read (imply TLS allocation for dlopen) of TLS variables. + */ +void lttng_time_ns_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(cached_time_ns))); } diff --git a/src/lib/lttng-ust/lttng-context-uts-ns.c b/src/lib/lttng-ust/lttng-context-uts-ns.c index 619649b3..06a978fd 100644 --- a/src/lib/lttng-ust/lttng-context-uts-ns.c +++ b/src/lib/lttng-ust/lttng-context-uts-ns.c @@ -152,9 +152,9 @@ error_find_context: } /* - * * Force a read (imply TLS fixup for dlopen) of TLS variables. - * */ -void lttng_fixup_uts_ns_tls(void) + * Force a read (imply TLS allocation for dlopen) of TLS variables. + */ +void lttng_uts_ns_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(cached_uts_ns))); } diff --git a/src/lib/lttng-ust/lttng-context-vtid.c b/src/lib/lttng-ust/lttng-context-vtid.c index 97a023d2..880e34b9 100644 --- a/src/lib/lttng-ust/lttng-context-vtid.c +++ b/src/lib/lttng-ust/lttng-context-vtid.c @@ -110,9 +110,9 @@ error_find_context: } /* - * Force a read (imply TLS fixup for dlopen) of TLS variables. + * Force a read (imply TLS allocation for dlopen) of TLS variables. */ -void lttng_fixup_vtid_tls(void) +void lttng_vtid_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(cached_vtid))); } diff --git a/src/lib/lttng-ust/lttng-probes.c b/src/lib/lttng-ust/lttng-probes.c index a0e9fffa..1e730649 100644 --- a/src/lib/lttng-ust/lttng-probes.c +++ b/src/lib/lttng-ust/lttng-probes.c @@ -164,7 +164,7 @@ struct lttng_ust_registered_probe *lttng_ust_probe_register(const struct lttng_u { struct lttng_ust_registered_probe *reg_probe = NULL; - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); /* * If version mismatch, don't register, but don't trigger assert @@ -202,7 +202,7 @@ end: void lttng_ust_probe_unregister(struct lttng_ust_registered_probe *reg_probe) { - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); if (!reg_probe) return; diff --git a/src/lib/lttng-ust/lttng-rb-clients.h b/src/lib/lttng-ust/lttng-rb-clients.h index e08c32cf..5e09c2b2 100644 --- a/src/lib/lttng-ust/lttng-rb-clients.h +++ b/src/lib/lttng-ust/lttng-rb-clients.h @@ -79,16 +79,16 @@ void lttng_ring_buffer_metadata_client_exit(void) __attribute__((visibility("hidden"))); -void lttng_ust_fixup_ring_buffer_client_overwrite_tls(void) +void lttng_ust_ring_buffer_client_overwrite_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_ust_fixup_ring_buffer_client_overwrite_rt_tls(void) +void lttng_ust_ring_buffer_client_overwrite_rt_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_ust_fixup_ring_buffer_client_discard_tls(void) +void lttng_ust_ring_buffer_client_discard_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_ust_fixup_ring_buffer_client_discard_rt_tls(void) +void lttng_ust_ring_buffer_client_discard_rt_alloc_tls(void) __attribute__((visibility("hidden"))); #endif /* _LTTNG_RB_CLIENT_H */ diff --git a/src/lib/lttng-ust/lttng-ring-buffer-client-discard-rt.c b/src/lib/lttng-ust/lttng-ring-buffer-client-discard-rt.c index 131ab639..71279ccf 100644 --- a/src/lib/lttng-ust/lttng-ring-buffer-client-discard-rt.c +++ b/src/lib/lttng-ust/lttng-ring-buffer-client-discard-rt.c @@ -12,8 +12,8 @@ #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard-rt" -#define RING_BUFFER_MODE_TEMPLATE_TLS_FIXUP \ - lttng_ust_fixup_ring_buffer_client_discard_rt_tls +#define RING_BUFFER_MODE_TEMPLATE_ALLOC_TLS \ + lttng_ust_ring_buffer_client_discard_rt_alloc_tls #define RING_BUFFER_MODE_TEMPLATE_INIT \ lttng_ring_buffer_client_discard_rt_init #define RING_BUFFER_MODE_TEMPLATE_EXIT \ diff --git a/src/lib/lttng-ust/lttng-ring-buffer-client-discard.c b/src/lib/lttng-ust/lttng-ring-buffer-client-discard.c index e7f605c3..5a6daa65 100644 --- a/src/lib/lttng-ust/lttng-ring-buffer-client-discard.c +++ b/src/lib/lttng-ust/lttng-ring-buffer-client-discard.c @@ -12,8 +12,8 @@ #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_DISCARD #define RING_BUFFER_MODE_TEMPLATE_STRING "discard" -#define RING_BUFFER_MODE_TEMPLATE_TLS_FIXUP \ - lttng_ust_fixup_ring_buffer_client_discard_tls +#define RING_BUFFER_MODE_TEMPLATE_ALLOC_TLS \ + lttng_ust_ring_buffer_client_discard_alloc_tls #define RING_BUFFER_MODE_TEMPLATE_INIT \ lttng_ring_buffer_client_discard_init #define RING_BUFFER_MODE_TEMPLATE_EXIT \ diff --git a/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite-rt.c b/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite-rt.c index 32a13130..8b5f6c36 100644 --- a/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite-rt.c +++ b/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite-rt.c @@ -12,8 +12,8 @@ #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite-rt" -#define RING_BUFFER_MODE_TEMPLATE_TLS_FIXUP \ - lttng_ust_fixup_ring_buffer_client_overwrite_rt_tls +#define RING_BUFFER_MODE_TEMPLATE_ALLOC_TLS \ + lttng_ust_ring_buffer_client_overwrite_rt_alloc_tls #define RING_BUFFER_MODE_TEMPLATE_INIT \ lttng_ring_buffer_client_overwrite_rt_init #define RING_BUFFER_MODE_TEMPLATE_EXIT \ diff --git a/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite.c b/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite.c index d550aa20..f5d34def 100644 --- a/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite.c +++ b/src/lib/lttng-ust/lttng-ring-buffer-client-overwrite.c @@ -12,8 +12,8 @@ #define RING_BUFFER_MODE_TEMPLATE RING_BUFFER_OVERWRITE #define RING_BUFFER_MODE_TEMPLATE_STRING "overwrite" -#define RING_BUFFER_MODE_TEMPLATE_TLS_FIXUP \ - lttng_ust_fixup_ring_buffer_client_overwrite_tls +#define RING_BUFFER_MODE_TEMPLATE_ALLOC_TLS \ + lttng_ust_ring_buffer_client_overwrite_alloc_tls #define RING_BUFFER_MODE_TEMPLATE_INIT \ lttng_ring_buffer_client_overwrite_init #define RING_BUFFER_MODE_TEMPLATE_EXIT \ diff --git a/src/lib/lttng-ust/lttng-ring-buffer-client-template.h b/src/lib/lttng-ust/lttng-ring-buffer-client-template.h index bc7fc2f2..16c8895f 100644 --- a/src/lib/lttng-ust/lttng-ring-buffer-client-template.h +++ b/src/lib/lttng-ust/lttng-ring-buffer-client-template.h @@ -71,9 +71,9 @@ typedef struct lttng_ust_ring_buffer_ctx_private private_ctx_stack_t[LIB_RING_BU static DEFINE_URCU_TLS(private_ctx_stack_t, private_ctx_stack); /* - * Force a read (imply TLS fixup for dlopen) of TLS variables. + * Force a read (imply TLS allocation for dlopen) of TLS variables. */ -void RING_BUFFER_MODE_TEMPLATE_TLS_FIXUP(void) +void RING_BUFFER_MODE_TEMPLATE_ALLOC_TLS(void) { asm volatile ("" : : "m" (URCU_TLS(private_ctx_stack))); } diff --git a/src/lib/lttng-ust/lttng-tracer-core.h b/src/lib/lttng-ust/lttng-tracer-core.h index 75765394..abe3ea74 100644 --- a/src/lib/lttng-ust/lttng-tracer-core.h +++ b/src/lib/lttng-ust/lttng-tracer-core.h @@ -34,31 +34,28 @@ void ust_lock_nocheck(void) void ust_unlock(void) __attribute__((visibility("hidden"))); -void lttng_ust_fixup_tls(void) +void lttng_ust_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_fixup_event_tls(void) +void lttng_vtid_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_fixup_vtid_tls(void) +void lttng_procname_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_fixup_procname_tls(void) +void lttng_cgroup_ns_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_fixup_cgroup_ns_tls(void) +void lttng_ipc_ns_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_fixup_ipc_ns_tls(void) +void lttng_net_ns_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_fixup_net_ns_tls(void) +void lttng_time_ns_alloc_tls(void) __attribute__((visibility("hidden"))); -void lttng_fixup_time_ns_tls(void) - __attribute__((visibility("hidden"))); - -void lttng_fixup_uts_ns_tls(void) +void lttng_uts_ns_alloc_tls(void) __attribute__((visibility("hidden"))); const char *lttng_ust_obj_get_name(int id) @@ -103,7 +100,7 @@ void lttng_counter_transport_unregister(struct lttng_counter_transport *transpor __attribute__((visibility("hidden"))); #ifdef HAVE_LINUX_PERF_EVENT_H -void lttng_ust_fixup_perf_counter_tls(void) +void lttng_ust_perf_counter_alloc_tls(void) __attribute__((visibility("hidden"))); void lttng_perf_lock(void) @@ -113,7 +110,7 @@ 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) +void lttng_ust_perf_counter_alloc_tls(void) { } static inline diff --git a/src/lib/lttng-ust/lttng-ust-comm.c b/src/lib/lttng-ust/lttng-ust-comm.c index dc1b6e37..b7656472 100644 --- a/src/lib/lttng-ust/lttng-ust-comm.c +++ b/src/lib/lttng-ust/lttng-ust-comm.c @@ -374,48 +374,48 @@ const char *get_lttng_home_dir(void) } /* - * Force a read (imply TLS fixup for dlopen) of TLS variables. + * Force a read (imply TLS allocation for dlopen) of TLS variables. */ static -void lttng_fixup_nest_count_tls(void) +void lttng_nest_count_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(lttng_ust_nest_count))); } static -void lttng_fixup_ust_mutex_nest_tls(void) +void lttng_ust_mutex_nest_alloc_tls(void) { asm volatile ("" : : "m" (URCU_TLS(ust_mutex_nest))); } /* - * Fixup lttng-ust urcu TLS. + * Allocate lttng-ust urcu TLS. */ static -void lttng_fixup_lttng_ust_urcu_tls(void) +void lttng_lttng_ust_urcu_alloc_tls(void) { (void) lttng_ust_urcu_read_ongoing(); } -void lttng_ust_fixup_tls(void) +void lttng_ust_alloc_tls(void) { - lttng_fixup_lttng_ust_urcu_tls(); - lttng_fixup_ringbuffer_tls(); - lttng_fixup_vtid_tls(); - lttng_fixup_nest_count_tls(); - lttng_fixup_procname_tls(); - lttng_fixup_ust_mutex_nest_tls(); - lttng_ust_fixup_perf_counter_tls(); - lttng_ust_fixup_fd_tracker_tls(); - lttng_fixup_cgroup_ns_tls(); - lttng_fixup_ipc_ns_tls(); - lttng_fixup_net_ns_tls(); - lttng_fixup_time_ns_tls(); - lttng_fixup_uts_ns_tls(); - lttng_ust_fixup_ring_buffer_client_discard_tls(); - lttng_ust_fixup_ring_buffer_client_discard_rt_tls(); - lttng_ust_fixup_ring_buffer_client_overwrite_tls(); - lttng_ust_fixup_ring_buffer_client_overwrite_rt_tls(); + lttng_lttng_ust_urcu_alloc_tls(); + lttng_ringbuffer_alloc_tls(); + lttng_vtid_alloc_tls(); + lttng_nest_count_alloc_tls(); + lttng_procname_alloc_tls(); + lttng_ust_mutex_nest_alloc_tls(); + lttng_ust_perf_counter_alloc_tls(); + lttng_ust_fd_tracker_alloc_tls(); + lttng_cgroup_ns_alloc_tls(); + lttng_ipc_ns_alloc_tls(); + lttng_net_ns_alloc_tls(); + lttng_time_ns_alloc_tls(); + lttng_uts_ns_alloc_tls(); + lttng_ust_ring_buffer_client_discard_alloc_tls(); + lttng_ust_ring_buffer_client_discard_rt_alloc_tls(); + lttng_ust_ring_buffer_client_overwrite_alloc_tls(); + lttng_ust_ring_buffer_client_overwrite_rt_alloc_tls(); } /* @@ -436,7 +436,7 @@ void lttng_ust_init_thread(void) * ensure those are initialized before a signal handler nesting over * this thread attempts to use them. */ - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); } int lttng_get_notify_socket(void *owner) @@ -1741,7 +1741,7 @@ void *ust_listener_thread(void *arg) int sock, ret, prev_connect_failed = 0, has_waited = 0, fd; long timeout; - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); /* * If available, add '-ust' to the end of this thread's * process name @@ -2069,11 +2069,11 @@ void lttng_ust_ctor(void) return; /* - * Fixup interdependency between TLS fixup mutex (which happens + * Fixup interdependency between TLS allocation mutex (which happens * to be the dynamic linker mutex) and ust_lock, taken within * the ust lock. */ - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); lttng_ust_loaded = 1; @@ -2378,8 +2378,8 @@ void lttng_ust_before_fork(sigset_t *save_sigset) sigset_t all_sigs; int ret; - /* Fixup lttng-ust TLS. */ - lttng_ust_fixup_tls(); + /* Allocate lttng-ust TLS. */ + lttng_ust_alloc_tls(); if (URCU_TLS(lttng_ust_nest_count)) return; diff --git a/src/lib/lttng-ust/lttng-ust-statedump.c b/src/lib/lttng-ust/lttng-ust-statedump.c index fca97d3e..64294706 100644 --- a/src/lib/lttng-ust/lttng-ust-statedump.c +++ b/src/lib/lttng-ust/lttng-ust-statedump.c @@ -554,10 +554,10 @@ void lttng_ust_dl_update(void *ip) return; /* - * Fixup lttng-ust TLS when called from dlopen/dlclose - * instrumentation. + * Force the allocation of lttng-ust TLS variables when called from + * dlopen/dlclose instrumentation. */ - lttng_ust_fixup_tls(); + lttng_ust_alloc_tls(); data.exec_found = 0; data.first = true;