Hide or namespace the remaining tracepoint internal symbols
authorMichael Jeanson <mjeanson@efficios.com>
Tue, 9 Mar 2021 19:56:44 +0000 (14:56 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 16 Mar 2021 16:43:02 +0000 (12:43 -0400)
The major SONAME bump to '1' gives us the opportunity to hide private
symbols that should never have been visible.

Namespace the symbols that are part of the liblttng-ust-tracepoint ABI
but are not part of the public API.

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

index e7b59b1b806a9d713f07879774c4c179d470d59d..ad71efefb65d4e051fbde78072958e5d68ba53ca 100644 (file)
@@ -254,7 +254,7 @@ void register_event(struct lttng_ust_event_common *event)
 
        assert(event->priv->registered == 0);
        desc = event->priv->desc;
-       ret = __tracepoint_probe_register_queue_release(desc->name,
+       ret = lttng_ust_tp_probe_register_queue_release(desc->name,
                        desc->probe_callback,
                        event, desc->signature);
        WARN_ON_ONCE(ret);
@@ -270,7 +270,7 @@ void unregister_event(struct lttng_ust_event_common *event)
 
        assert(event->priv->registered == 1);
        desc = event->priv->desc;
-       ret = __tracepoint_probe_unregister_queue_release(desc->name,
+       ret = lttng_ust_tp_probe_unregister_queue_release(desc->name,
                        desc->probe_callback,
                        event);
        WARN_ON_ONCE(ret);
@@ -297,7 +297,7 @@ void lttng_session_destroy(struct lttng_session *session)
                _lttng_event_unregister(event_recorder_priv->parent.pub);
        }
        lttng_ust_urcu_synchronize_rcu();       /* Wait for in-flight events to complete */
-       __tracepoint_probe_prune_release_queue();
+       lttng_ust_tp_probe_prune_release_queue();
        cds_list_for_each_entry_safe(event_enabler, event_tmpenabler,
                        &session->priv->enablers_head, node)
                lttng_event_enabler_destroy(event_enabler);
@@ -1186,7 +1186,7 @@ void lttng_probe_provider_unregister_events(
        /* Wait for grace period. */
        lttng_ust_urcu_synchronize_rcu();
        /* Prune the unregistration queue. */
-       __tracepoint_probe_prune_release_queue();
+       lttng_ust_tp_probe_prune_release_queue();
 
        /*
         * It is now safe to destroy the events and remove them from the event list
@@ -1703,7 +1703,7 @@ void lttng_session_sync_event_enablers(struct lttng_session *session)
                        lttng_bytecode_filter_sync_state(runtime);
                }
        }
-       __tracepoint_probe_prune_release_queue();
+       lttng_ust_tp_probe_prune_release_queue();
 }
 
 /* Support for event notifier is introduced by probe provider major version 2. */
@@ -1921,7 +1921,7 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group
                        lttng_bytecode_capture_sync_state(runtime);
                }
        }
-       __tracepoint_probe_prune_release_queue();
+       lttng_ust_tp_probe_prune_release_queue();
 }
 
 /*
index 18705e8b1aef60edb3cc5dd507275705d7476f0c..424b9e655a57822b432d4e1a95f8182d0fb853ca 100644 (file)
@@ -11,6 +11,8 @@
 #include <lttng/tracepoint-types.h>
 #include <lttng/ust-events.h>
 
+#include "ust-helper.h"
+
 #define TRACE_DEFAULT  TRACE_DEBUG_LINE
 
 struct tracepoint_lib {
@@ -20,23 +22,33 @@ struct tracepoint_lib {
        struct cds_list_head callsites;
 };
 
-extern int tracepoint_probe_register_noupdate(const char *name,
+LTTNG_HIDDEN
+int tracepoint_probe_register_noupdate(const char *name,
                void (*callback)(void), void *priv,
                const char *signature);
-extern int tracepoint_probe_unregister_noupdate(const char *name,
+
+LTTNG_HIDDEN
+int tracepoint_probe_unregister_noupdate(const char *name,
                void (*callback)(void), void *priv);
-extern void tracepoint_probe_update_all(void);
-extern int __tracepoint_probe_register_queue_release(const char *name,
+LTTNG_HIDDEN
+void tracepoint_probe_update_all(void);
+
+void *lttng_ust_tp_check_weak_hidden1(void);
+void *lttng_ust_tp_check_weak_hidden2(void);
+void *lttng_ust_tp_check_weak_hidden3(void);
+
+/*
+ * These symbols are ABI between liblttng-ust-tracepoint and liblttng-ust,
+ * which is why they are not hidden and not part of the public API.
+ */
+int lttng_ust_tp_probe_register_queue_release(const char *name,
                void (*func)(void), void *data, const char *signature);
-extern int __tracepoint_probe_unregister_queue_release(const char *name,
+int lttng_ust_tp_probe_unregister_queue_release(const char *name,
                void (*func)(void), void *data);
-extern void __tracepoint_probe_prune_release_queue(void);
+void lttng_ust_tp_probe_prune_release_queue(void);
 
 void lttng_ust_tp_init(void);
 void lttng_ust_tp_exit(void);
 
-void *lttng_ust_tp_check_weak_hidden1(void);
-void *lttng_ust_tp_check_weak_hidden2(void);
-void *lttng_ust_tp_check_weak_hidden3(void);
 
 #endif /* _LTTNG_TRACEPOINT_INTERNAL_H */
index b966d76b1b72c8fea43f74ac8bbcb1364aed5de2..8d41d97a7793c79f56a9a1d9cc51c4f9b2f60fd6 100644 (file)
@@ -619,10 +619,10 @@ end:
 
 /*
  * Caller needs to invoke __tracepoint_probe_release_queue() after
- * calling __tracepoint_probe_register_queue_release() one or multiple
+ * calling lttng_ust_tp_probe_register_queue_release() one or multiple
  * times to ensure it does not leak memory.
  */
-int __tracepoint_probe_register_queue_release(const char *name,
+int lttng_ust_tp_probe_register_queue_release(const char *name,
                void (*probe)(void), void *data, const char *signature)
 {
        void *old;
@@ -690,10 +690,10 @@ end:
 
 /*
  * Caller needs to invoke __tracepoint_probe_release_queue() after
- * calling __tracepoint_probe_unregister_queue_release() one or multiple
+ * calling lttng_ust_tp_probe_unregister_queue_release() one or multiple
  * times to ensure it does not leak memory.
  */
-int __tracepoint_probe_unregister_queue_release(const char *name,
+int lttng_ust_tp_probe_unregister_queue_release(const char *name,
                void (*probe)(void), void *data)
 {
        void *old;
@@ -714,7 +714,7 @@ end:
        return ret;
 }
 
-void __tracepoint_probe_prune_release_queue(void)
+void lttng_ust_tp_probe_prune_release_queue(void)
 {
        CDS_LIST_HEAD(release_probes);
        struct tp_probes *pos, *next;
This page took 0.02941 seconds and 4 git commands to generate.