Fix: lttng perf counter deadlock
[lttng-ust.git] / liblttng-ust / lttng-ust-comm.c
index d3e01251bb107a4e3e98f39bff5a46c9a3de7274..84a995edd7c05fedd7bd7268804da7517385cfe8 100644 (file)
@@ -419,6 +419,7 @@ void lttng_ust_fixup_tls(void)
        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();
 }
 
@@ -1453,7 +1454,6 @@ void *ust_listener_thread(void *arg)
        long timeout;
 
        lttng_ust_fixup_tls();
-       lttng_ust_fd_tracker_register_thread();
        /*
         * If available, add '-ust' to the end of this thread's
         * process name
@@ -2044,6 +2044,7 @@ void ust_before_fork(sigset_t *save_sigset)
        ust_lock_nocheck();
        rcu_bp_before_fork();
        lttng_ust_lock_fd_tracker();
+       lttng_perf_lock();
 }
 
 static void ust_after_fork_common(sigset_t *restore_sigset)
@@ -2051,6 +2052,7 @@ static void ust_after_fork_common(sigset_t *restore_sigset)
        int ret;
 
        DBG("process %d", getpid());
+       lttng_perf_unlock();
        lttng_ust_unlock_fd_tracker();
        ust_unlock();
 
This page took 0.023077 seconds and 4 git commands to generate.