Remove LTTNG_HIDDEN macro
[lttng-ust.git] / liblttng-ust / lttng-events.c
index 5a3aae8d8725191c34398a1d89305efc735a8865..ad71efefb65d4e051fbde78072958e5d68ba53ca 100644 (file)
@@ -250,11 +250,11 @@ static
 void register_event(struct lttng_ust_event_common *event)
 {
        int ret;
-       const struct lttng_event_desc *desc;
+       const struct lttng_ust_event_desc *desc;
 
        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);
@@ -266,11 +266,11 @@ static
 void unregister_event(struct lttng_ust_event_common *event)
 {
        int ret;
-       const struct lttng_event_desc *desc;
+       const struct lttng_ust_event_desc *desc;
 
        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);
@@ -398,7 +398,7 @@ void lttng_enabler_destroy(struct lttng_enabler *enabler)
 }
 
 static
-int lttng_enum_create(const struct lttng_enum_desc *desc,
+int lttng_enum_create(const struct lttng_ust_enum_desc *desc,
                struct lttng_session *session)
 {
        const char *enum_name = desc->name;
@@ -462,7 +462,7 @@ int lttng_create_enum_check(const struct lttng_type *type,
        switch (type->atype) {
        case atype_enum_nestable:
        {
-               const struct lttng_enum_desc *enum_desc;
+               const struct lttng_ust_enum_desc *enum_desc;
                int ret;
 
                enum_desc = type->u.enum_nestable.desc;
@@ -475,8 +475,8 @@ int lttng_create_enum_check(const struct lttng_type *type,
        }
        case atype_dynamic:
        {
-               const struct lttng_event_field *tag_field_generic;
-               const struct lttng_enum_desc *enum_desc;
+               const struct lttng_ust_event_field *tag_field_generic;
+               const struct lttng_ust_enum_desc *enum_desc;
                int ret;
 
                tag_field_generic = lttng_ust_dynamic_type_tag_field();
@@ -497,7 +497,7 @@ int lttng_create_enum_check(const struct lttng_type *type,
 
 static
 int lttng_create_all_event_enums(size_t nr_fields,
-               const struct lttng_event_field *event_fields,
+               const struct lttng_ust_event_field **event_fields,
                struct lttng_session *session)
 {
        size_t i;
@@ -505,7 +505,7 @@ int lttng_create_all_event_enums(size_t nr_fields,
 
        /* For each field, ensure enum is part of the session. */
        for (i = 0; i < nr_fields; i++) {
-               const struct lttng_type *type = &event_fields[i].type;
+               const struct lttng_type *type = &event_fields[i]->type;
 
                ret = lttng_create_enum_check(type, session);
                if (ret)
@@ -675,7 +675,7 @@ static inline
 struct cds_hlist_head *borrow_hash_table_bucket(
                struct cds_hlist_head *hash_table,
                unsigned int hash_table_size,
-               const struct lttng_event_desc *desc)
+               const struct lttng_ust_event_desc *desc)
 {
        const char *event_name;
        size_t name_len;
@@ -692,7 +692,7 @@ struct cds_hlist_head *borrow_hash_table_bucket(
  * Supports event creation while tracing session is active.
  */
 static
-int lttng_event_recorder_create(const struct lttng_event_desc *desc,
+int lttng_event_recorder_create(const struct lttng_ust_event_desc *desc,
                struct lttng_channel *chan)
 {
        struct lttng_ust_event_recorder *event_recorder;
@@ -761,8 +761,8 @@ int lttng_event_recorder_create(const struct lttng_event_desc *desc,
                loglevel = *(*event_recorder->parent->priv->desc->loglevel);
        else
                loglevel = TRACE_DEFAULT;
-       if (desc->u.ext.model_emf_uri)
-               uri = *(desc->u.ext.model_emf_uri);
+       if (desc->model_emf_uri)
+               uri = *(desc->model_emf_uri);
        else
                uri = NULL;
 
@@ -800,7 +800,7 @@ socket_error:
 }
 
 static
-int lttng_event_notifier_create(const struct lttng_event_desc *desc,
+int lttng_event_notifier_create(const struct lttng_ust_event_desc *desc,
                uint64_t token, uint64_t error_counter_index,
                struct lttng_event_notifier_group *event_notifier_group)
 {
@@ -872,7 +872,7 @@ error:
 }
 
 static
-int lttng_desc_match_star_glob_enabler(const struct lttng_event_desc *desc,
+int lttng_desc_match_star_glob_enabler(const struct lttng_ust_event_desc *desc,
                struct lttng_enabler *enabler)
 {
        int loglevel = 0;
@@ -895,7 +895,7 @@ int lttng_desc_match_star_glob_enabler(const struct lttng_event_desc *desc,
 }
 
 static
-int lttng_desc_match_event_enabler(const struct lttng_event_desc *desc,
+int lttng_desc_match_event_enabler(const struct lttng_ust_event_desc *desc,
                struct lttng_enabler *enabler)
 {
        int loglevel = 0;
@@ -917,7 +917,7 @@ int lttng_desc_match_event_enabler(const struct lttng_event_desc *desc,
 }
 
 static
-int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
+int lttng_desc_match_enabler(const struct lttng_ust_event_desc *desc,
                struct lttng_enabler *enabler)
 {
        switch (enabler->format_type) {
@@ -1005,8 +1005,8 @@ static
 void lttng_create_event_recorder_if_missing(struct lttng_event_enabler *event_enabler)
 {
        struct lttng_session *session = event_enabler->chan->session;
-       struct lttng_probe_desc *probe_desc;
-       const struct lttng_event_desc *desc;
+       struct lttng_ust_probe_desc *probe_desc;
+       const struct lttng_ust_event_desc *desc;
        struct lttng_ust_event_recorder_private *event_recorder_priv;
        int i;
        struct cds_list_head *probe_list;
@@ -1058,7 +1058,7 @@ void lttng_create_event_recorder_if_missing(struct lttng_event_enabler *event_en
 }
 
 static
-void probe_provider_event_for_each(struct lttng_probe_desc *provider_desc,
+void probe_provider_event_for_each(struct lttng_ust_probe_desc *provider_desc,
                void (*event_func)(struct lttng_ust_event_common *event))
 {
        struct cds_hlist_node *node, *tmp_node;
@@ -1073,7 +1073,7 @@ void probe_provider_event_for_each(struct lttng_probe_desc *provider_desc,
         * sessions to queue the unregistration of the events.
         */
        for (i = 0; i < provider_desc->nr_events; i++) {
-               const struct lttng_event_desc *event_desc;
+               const struct lttng_ust_event_desc *event_desc;
                struct lttng_event_notifier_group *event_notifier_group;
                struct lttng_ust_event_recorder_private *event_recorder_priv;
                struct lttng_ust_event_notifier_private *event_notifier_priv;
@@ -1140,11 +1140,11 @@ void _event_enum_destroy(struct lttng_ust_event_common *event)
 
                /* Destroy enums of the current event. */
                for (i = 0; i < event_recorder->parent->priv->desc->nr_fields; i++) {
-                       const struct lttng_enum_desc *enum_desc;
-                       const struct lttng_event_field *field;
+                       const struct lttng_ust_enum_desc *enum_desc;
+                       const struct lttng_ust_event_field *field;
                        struct lttng_enum *curr_enum;
 
-                       field = &(event_recorder->parent->priv->desc->fields[i]);
+                       field = event_recorder->parent->priv->desc->fields[i];
                        switch (field->type.atype) {
                        case atype_enum_nestable:
                                enum_desc = field->type.u.enum_nestable.desc;
@@ -1175,7 +1175,7 @@ void _event_enum_destroy(struct lttng_ust_event_common *event)
  * ust_lock held.
  */
 void lttng_probe_provider_unregister_events(
-               struct lttng_probe_desc *provider_desc)
+               struct lttng_ust_probe_desc *provider_desc)
 {
        /*
         * Iterate over all events in the probe provider descriptions and sessions
@@ -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
@@ -1654,7 +1654,7 @@ void lttng_session_sync_event_enablers(struct lttng_session *session)
         */
        cds_list_for_each_entry(event_recorder_priv, &session->priv->events_head, node) {
                struct lttng_enabler_ref *enabler_ref;
-               struct lttng_bytecode_runtime *runtime;
+               struct lttng_ust_bytecode_runtime *runtime;
                int enabled = 0, has_enablers_without_bytecode = 0;
 
                /* Enable events */
@@ -1703,12 +1703,12 @@ 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. */
 static
-bool lttng_ust_probe_supports_event_notifier(struct lttng_probe_desc *probe_desc)
+bool lttng_ust_probe_supports_event_notifier(struct lttng_ust_probe_desc *probe_desc)
 {
        return probe_desc->major >= 2;
 }
@@ -1718,7 +1718,7 @@ void lttng_create_event_notifier_if_missing(
                struct lttng_event_notifier_enabler *event_notifier_enabler)
 {
        struct lttng_event_notifier_group *event_notifier_group = event_notifier_enabler->group;
-       struct lttng_probe_desc *probe_desc;
+       struct lttng_ust_probe_desc *probe_desc;
        struct cds_list_head *probe_list;
        int i;
 
@@ -1728,7 +1728,7 @@ void lttng_create_event_notifier_if_missing(
                for (i = 0; i < probe_desc->nr_events; i++) {
                        int ret;
                        bool found = false;
-                       const struct lttng_event_desc *desc;
+                       const struct lttng_ust_event_desc *desc;
                        struct lttng_ust_event_notifier_private *event_notifier_priv;
                        struct cds_hlist_head *head;
                        struct cds_hlist_node *node;
@@ -1872,7 +1872,7 @@ void lttng_event_notifier_group_sync_enablers(struct lttng_event_notifier_group
         */
        cds_list_for_each_entry(event_notifier_priv, &event_notifier_group->event_notifiers_head, node) {
                struct lttng_enabler_ref *enabler_ref;
-               struct lttng_bytecode_runtime *runtime;
+               struct lttng_ust_bytecode_runtime *runtime;
                int enabled = 0, has_enablers_without_bytecode = 0;
 
                /* Enable event_notifiers */
@@ -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();
 }
 
 /*
This page took 0.038169 seconds and 4 git commands to generate.