Remove lttng_ust_synchronize_trace public symbol
authorMichael Jeanson <mjeanson@efficios.com>
Wed, 10 Mar 2021 22:15:28 +0000 (17:15 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 11 Mar 2021 13:35:43 +0000 (08:35 -0500)
Remove 'lttng_ust_synchronize_trace', an ABI symbol of the
liblttng-ust-tracepoint library that only wraps
'lttng_ust_urcu_synchronize_rcu', a common extern symbol across
all libraries.

Replace it with direct calls to 'lttng_ust_urcu_synchronize_rcu'.

Change-Id: Ieed2e4a195bb1cfab5a97d746024a6a1c5854362
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/lttng-context.c
liblttng-ust/lttng-events.c
liblttng-ust/lttng-ust-abi.c
liblttng-ust/tracepoint-internal.h
liblttng-ust/tracepoint.c

index 59bc082b6e353e43b7152bc2e2f245fb3d77d269..34609eb057291fd9355f9e953360cc0e29bc6379 100644 (file)
@@ -11,6 +11,7 @@
 #include <lttng/ust-tracer.h>
 #include <ust-context-provider.h>
 #include <lttng/urcu/pointer.h>
+#include <lttng/urcu/urcu-ust.h>
 #include <usterr-signal-safe.h>
 #include <ust-helper.h>
 #include <stddef.h>
@@ -145,7 +146,7 @@ int lttng_context_add_rcu(struct lttng_ctx **ctx_p,
        *nf = *f;
        lttng_context_update(new_ctx);
        lttng_ust_rcu_assign_pointer(*ctx_p, new_ctx);
-       lttng_ust_synchronize_trace();
+       lttng_ust_urcu_synchronize_rcu();
        if (old_ctx) {
                free(old_ctx->fields);
                free(old_ctx);
@@ -379,7 +380,7 @@ int lttng_ust_context_set_provider_rcu(struct lttng_ctx **_ctx,
        }
        new_ctx->fields = new_fields;
        lttng_ust_rcu_assign_pointer(*_ctx, new_ctx);
-       lttng_ust_synchronize_trace();
+       lttng_ust_urcu_synchronize_rcu();
        free(ctx->fields);
        free(ctx);
        return 0;
index fb922c7279efdc01a773f412e46ac454c1e84890..d806f0431aec7225cf7467fdf646e948cdc3204a 100644 (file)
@@ -331,7 +331,7 @@ void lttng_session_destroy(struct lttng_session *session)
        cds_list_for_each_entry(event, &session->events_head, node) {
                _lttng_event_unregister(event);
        }
-       lttng_ust_synchronize_trace();  /* Wait for in-flight events to complete */
+       lttng_ust_urcu_synchronize_rcu();       /* Wait for in-flight events to complete */
        __tracepoint_probe_prune_release_queue();
        cds_list_for_each_entry_safe(event_enabler, event_tmpenabler,
                        &session->enablers_head, node)
@@ -364,7 +364,7 @@ void lttng_event_notifier_group_destroy(
                        &event_notifier_group->event_notifiers_head, node)
                _lttng_event_notifier_unregister(notifier);
 
-       lttng_ust_synchronize_trace();
+       lttng_ust_urcu_synchronize_rcu();
 
        cds_list_for_each_entry_safe(notifier_enabler, tmpnotifier_enabler,
                        &event_notifier_group->enablers_head, node)
@@ -1201,7 +1201,7 @@ void lttng_probe_provider_unregister_events(
                _lttng_event_notifier_unregister);
 
        /* Wait for grace period. */
-       lttng_ust_synchronize_trace();
+       lttng_ust_urcu_synchronize_rcu();
        /* Prune the unregistration queue. */
        __tracepoint_probe_prune_release_queue();
 
index 10d5bcbe4fc78be19a7da2c1596a2360a897d7d5..9a9f1b7a52dbf020a06d41fb51e2146fa5cf8a00 100644 (file)
@@ -422,7 +422,7 @@ long lttng_cmd(int objd, unsigned int cmd, unsigned long arg,
        case LTTNG_UST_TRACEPOINT_FIELD_LIST:
                return lttng_abi_tracepoint_field_list(owner);
        case LTTNG_UST_WAIT_QUIESCENT:
-               lttng_ust_synchronize_trace();
+               lttng_ust_urcu_synchronize_rcu();
                return 0;
        case LTTNG_UST_EVENT_NOTIFIER_GROUP_CREATE:
                return lttng_abi_event_notifier_send_fd(owner,
index 15661652b000adc2cde3588105b8f37a6857167f..aeb878a17c3af38f404d9ee3fd718391b3774d16 100644 (file)
@@ -32,17 +32,6 @@ extern int __tracepoint_probe_unregister_queue_release(const char *name,
                void (*func)(void), void *data);
 extern void __tracepoint_probe_prune_release_queue(void);
 
-void lttng_ust_synchronize_trace(void);
-
-/*
- * call after disconnection of last probe implemented within a
- * shared object before unmapping the library that contains the probe.
- */
-static inline void tracepoint_synchronize_unregister(void)
-{
-       lttng_ust_synchronize_trace();
-}
-
 extern void init_tracepoint(void);
 extern void exit_tracepoint(void);
 
index e0b5da3f46386fb39312a743d002db0efdddcacb..d84f6a7d85f63dfcfd98fabbef18bdbb0d232f3e 100644 (file)
@@ -145,7 +145,7 @@ static void release_probes(void *old)
        if (old) {
                struct tp_probes *tp_probes = caa_container_of(old,
                        struct tp_probes, probes[0]);
-               lttng_ust_synchronize_trace();
+               lttng_ust_urcu_synchronize_rcu();
                free(tp_probes);
        }
 }
@@ -729,7 +729,7 @@ void __tracepoint_probe_prune_release_queue(void)
        release_queue_need_update = 0;
 
        /* Wait for grace period between all sync_callsites and free. */
-       lttng_ust_synchronize_trace();
+       lttng_ust_urcu_synchronize_rcu();
 
        cds_list_for_each_entry_safe(pos, next, &release_probes, u.list) {
                cds_list_del(&pos->u.list);
@@ -820,7 +820,7 @@ void tracepoint_probe_update_all(void)
 
        tracepoint_update_probes();
        /* Wait for grace period between update_probes and free. */
-       lttng_ust_synchronize_trace();
+       lttng_ust_urcu_synchronize_rcu();
        cds_list_for_each_entry_safe(pos, next, &release_probes, u.list) {
                cds_list_del(&pos->u.list);
                free(pos);
@@ -1015,8 +1015,3 @@ int tp_get_destructors_state(void)
 {
        return uatomic_read(&tracepoint_destructors_state);
 }
-
-void lttng_ust_synchronize_trace(void)
-{
-       lttng_ust_urcu_synchronize_rcu();
-}
This page took 0.030682 seconds and 4 git commands to generate.