Adapt lttng-ust to use multiflavor symbols from liburcu 0.11
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 28 Nov 2018 21:56:59 +0000 (16:56 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 12 Dec 2018 16:59:20 +0000 (11:59 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
configure.ac
include/lttng/tracepoint-rcu.h
liblttng-ust/lttng-ust-comm.c
liblttng-ust/tracepoint-internal.h
liblttng-ust/tracepoint.c

index a3e1e238ce47f85596f419928bc3ae86f89e32b1..5f27f99980d850edd0c065fc879558b7c1b03233 100644 (file)
@@ -275,10 +275,10 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
 ])
 
 # urcu - check that URCU lib is available to compilation
-AC_CHECK_LIB([urcu-bp], [synchronize_rcu_bp], [], [AC_MSG_ERROR([Cannot find liburcu-bp lib. Use [LDFLAGS]=-Ldir to specify its location.])])
+AC_CHECK_LIB([urcu-bp], [urcu_bp_synchronize_rcu], [], [AC_MSG_ERROR([Cannot find liburcu-bp 0.11 or newer. Use [LDFLAGS]=-Ldir to specify its location.])])
 
-# urcu - check that URCU lib is at least version 0.6
-AC_CHECK_LIB([urcu-bp], [call_rcu_bp], [], [AC_MSG_ERROR([liburcu 0.6 or newer is needed, please update your version or use [LDFLAGS]=-Ldir to specify the right location.])])
+# urcu - check that URCU lib is at least version 0.11
+AC_CHECK_LIB([urcu-bp], [urcu_bp_call_rcu], [], [AC_MSG_ERROR([liburcu 0.11 or newer is needed, please update your version or use [LDFLAGS]=-Ldir to specify the right location.])])
 
 # numa.h integration
 AS_IF([test "x$NO_NUMA" = "x1"],[
index 0e084853f1130148dd33a8470d075dc550b69b7a..95d60493c0b04f62e53af82f831eeeeb8e048ffb 100644 (file)
 
 #ifdef _LGPL_SOURCE
 
-#include <urcu-bp.h>
+#include <urcu/urcu-bp.h>
 
-#define tp_rcu_read_lock_bp    rcu_read_lock_bp
-#define tp_rcu_read_unlock_bp  rcu_read_unlock_bp
+#define tp_rcu_read_lock_bp    urcu_bp_read_lock
+#define tp_rcu_read_unlock_bp  urcu_bp_read_unlock
 #define tp_rcu_dereference_bp  rcu_dereference
 #define TP_RCU_LINK_TEST()     1
 
index b61833155425988d261e9e584247e3b76ebf9c90..a09f676a42978146fd8d7d12b1e2638738c37334 100644 (file)
@@ -1969,7 +1969,7 @@ void ust_before_fork(sigset_t *save_sigset)
        pthread_mutex_lock(&ust_fork_mutex);
 
        ust_lock_nocheck();
-       rcu_bp_before_fork();
+       urcu_bp_before_fork();
 }
 
 static void ust_after_fork_common(sigset_t *restore_sigset)
@@ -1993,7 +1993,7 @@ void ust_after_fork_parent(sigset_t *restore_sigset)
        if (URCU_TLS(lttng_ust_nest_count))
                return;
        DBG("process %d", getpid());
-       rcu_bp_after_fork_parent();
+       urcu_bp_after_fork_parent();
        /* Release mutexes and reenable signals */
        ust_after_fork_common(restore_sigset);
 }
@@ -2016,7 +2016,7 @@ void ust_after_fork_child(sigset_t *restore_sigset)
        lttng_context_procname_reset();
        DBG("process %d", getpid());
        /* Release urcu mutexes */
-       rcu_bp_after_fork_child();
+       urcu_bp_after_fork_child();
        lttng_ust_cleanup(0);
        /* Release mutexes and reenable signals */
        ust_after_fork_common(restore_sigset);
index 298f78e7313f7e7299b6ffc84f1cdd13a20148f5..1e6f92b677e812dfe6d4b5a2d75eb695417f4894 100644 (file)
@@ -50,7 +50,7 @@ extern void __tracepoint_probe_prune_release_queue(void);
  */
 static inline void tracepoint_synchronize_unregister(void)
 {
-       synchronize_rcu_bp();
+       urcu_bp_synchronize_rcu();
 }
 
 extern void init_tracepoint(void);
index efd95bc1233ef07086e3a889166e40eca3b3d4a7..b109fe30152b2968f7aba03736bab0cae53dbd89 100644 (file)
@@ -26,7 +26,7 @@
 #include <stdio.h>
 
 #include <urcu/arch.h>
-#include <urcu-bp.h>
+#include <urcu/urcu-bp.h>
 #include <urcu/hlist.h>
 #include <urcu/uatomic.h>
 #include <urcu/compiler.h>
@@ -166,7 +166,7 @@ static void release_probes(void *old)
        if (old) {
                struct tp_probes *tp_probes = caa_container_of(old,
                        struct tp_probes, probes[0]);
-               synchronize_rcu();
+               urcu_bp_synchronize_rcu();
                free(tp_probes);
        }
 }
@@ -750,7 +750,7 @@ void __tracepoint_probe_prune_release_queue(void)
        release_queue_need_update = 0;
 
        /* Wait for grace period between all sync_callsites and free. */
-       synchronize_rcu();
+       urcu_bp_synchronize_rcu();
 
        cds_list_for_each_entry_safe(pos, next, &release_probes, u.list) {
                cds_list_del(&pos->u.list);
@@ -841,7 +841,7 @@ void tracepoint_probe_update_all(void)
 
        tracepoint_update_probes();
        /* Wait for grace period between update_probes and free. */
-       synchronize_rcu();
+       urcu_bp_synchronize_rcu();
        cds_list_for_each_entry_safe(pos, next, &release_probes, u.list) {
                cds_list_del(&pos->u.list);
                free(pos);
@@ -987,17 +987,17 @@ void exit_tracepoint(void)
 
 void tp_rcu_read_lock_bp(void)
 {
-       rcu_read_lock_bp();
+       urcu_bp_read_lock();
 }
 
 void tp_rcu_read_unlock_bp(void)
 {
-       rcu_read_unlock_bp();
+       urcu_bp_read_unlock();
 }
 
 void *tp_rcu_dereference_sym_bp(void *p)
 {
-       return rcu_dereference_bp(p);
+       return urcu_bp_dereference(p);
 }
 
 /*
This page took 0.029134 seconds and 4 git commands to generate.