diff mbox series

[2/2] lttng_ust_init_thread: call urcu_register_thread

Message ID 20220718215955.124991-2-nolange79@gmail.com
State New
Headers show
Series [1/2] lttng_ust_init_thread: initialise cached context values | expand

Commit Message

Norbert Lange July 18, 2022, 9:59 p.m. UTC
Eagerly register the thread, and avoid taking mutex during the
first tracepoint.

Signed-off-by: Norbert Lange <nolange79 at gmail.com>
---
 src/lib/lttng-ust/lttng-ust-comm.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Mathieu Desnoyers July 19, 2022, 7:40 p.m. UTC | #1
----- On Jul 18, 2022, at 5:59 PM, Norbert Lange via lttng-dev lttng-dev at lists.lttng.org wrote:

> Eagerly register the thread, and avoid taking mutex during the
> first tracepoint.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>

Please resubmit with the next round with my acked-by tag.

Mathieu

> 
> Signed-off-by: Norbert Lange <nolange79 at gmail.com>
> ---
> src/lib/lttng-ust/lttng-ust-comm.c | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/src/lib/lttng-ust/lttng-ust-comm.c
> b/src/lib/lttng-ust/lttng-ust-comm.c
> index ba0bd985..3ff6b086 100644
> --- a/src/lib/lttng-ust/lttng-ust-comm.c
> +++ b/src/lib/lttng-ust/lttng-ust-comm.c
> @@ -447,6 +447,8 @@ void lttng_ust_init_thread(void)
> 	 * this thread attempts to use them.
> 	 */
> 	lttng_ust_alloc_tls(true);
> +
> +	lttng_ust_urcu_register_thread();
> }
> 
> int lttng_get_notify_socket(void *owner)
> --
> 2.35.1
> 
> _______________________________________________
> lttng-dev mailing list
> lttng-dev at lists.lttng.org
> https://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
diff mbox series

Patch

diff --git a/src/lib/lttng-ust/lttng-ust-comm.c b/src/lib/lttng-ust/lttng-ust-comm.c
index ba0bd985..3ff6b086 100644
--- a/src/lib/lttng-ust/lttng-ust-comm.c
+++ b/src/lib/lttng-ust/lttng-ust-comm.c
@@ -447,6 +447,8 @@  void lttng_ust_init_thread(void)
 	 * this thread attempts to use them.
 	 */
 	lttng_ust_alloc_tls(true);
+
+	lttng_ust_urcu_register_thread();
 }
 
 int lttng_get_notify_socket(void *owner)