From: Michael Jeanson Date: Wed, 10 Mar 2021 22:15:28 +0000 (-0500) Subject: Remove lttng_ust_synchronize_trace public symbol X-Git-Tag: v2.13.0-rc1~314 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=b653ddc1c1b44ad674265ebb749cfebd97be350e;p=lttng-ust.git Remove lttng_ust_synchronize_trace public symbol 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 Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/lttng-context.c b/liblttng-ust/lttng-context.c index 59bc082b..34609eb0 100644 --- a/liblttng-ust/lttng-context.c +++ b/liblttng-ust/lttng-context.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -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; diff --git a/liblttng-ust/lttng-events.c b/liblttng-ust/lttng-events.c index fb922c72..d806f043 100644 --- a/liblttng-ust/lttng-events.c +++ b/liblttng-ust/lttng-events.c @@ -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(); diff --git a/liblttng-ust/lttng-ust-abi.c b/liblttng-ust/lttng-ust-abi.c index 10d5bcbe..9a9f1b7a 100644 --- a/liblttng-ust/lttng-ust-abi.c +++ b/liblttng-ust/lttng-ust-abi.c @@ -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, diff --git a/liblttng-ust/tracepoint-internal.h b/liblttng-ust/tracepoint-internal.h index 15661652..aeb878a1 100644 --- a/liblttng-ust/tracepoint-internal.h +++ b/liblttng-ust/tracepoint-internal.h @@ -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); diff --git a/liblttng-ust/tracepoint.c b/liblttng-ust/tracepoint.c index e0b5da3f..d84f6a7d 100644 --- a/liblttng-ust/tracepoint.c +++ b/liblttng-ust/tracepoint.c @@ -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(); -}