Rename struct lttng_event to struct lttng_ust_event_recorder
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 12 Mar 2021 19:01:55 +0000 (14:01 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 12 Mar 2021 19:04:30 +0000 (14:04 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I8b71cdf178602b2fe12292454960e498248da887

include/lttng/ust-events.h
include/lttng/ust-tracepoint-event.h
liblttng-ust/lttng-bytecode.c
liblttng-ust/lttng-events.c
liblttng-ust/lttng-ring-buffer-client.h
liblttng-ust/ust-events-internal.h

index aebe3b72373ab31aefe6f5fef508a14bb2b05bed..4cc4e1e431f9442fc8625d15a3c25a614c69d33f 100644 (file)
@@ -361,12 +361,12 @@ struct lttng_event_common {
        struct cds_list_head filter_bytecode_runtime_head;
 };
 
-struct lttng_ust_event_private;
+struct lttng_ust_event_recorder_private;
 
-struct lttng_event {
-       uint32_t struct_size;                   /* Size of this structure. */
+struct lttng_ust_event_recorder {
+       uint32_t struct_size;                           /* Size of this structure. */
        struct lttng_event_common *parent;
-       struct lttng_ust_event_private *priv;   /* Private event interface */
+       struct lttng_ust_event_recorder_private *priv;  /* Private event record interface */
 
        unsigned int id;
        struct lttng_channel *chan;
@@ -491,7 +491,7 @@ struct lttng_counter_ops {
 
 #define LTTNG_UST_STACK_CTX_PADDING    32
 struct lttng_stack_ctx {
-       struct lttng_event *event;
+       struct lttng_ust_event_recorder *event_recorder;
        struct lttng_ctx *chan_ctx;     /* RCU dereferenced. */
        struct lttng_ctx *event_ctx;    /* RCU dereferenced. */
        char padding[LTTNG_UST_STACK_CTX_PADDING];
index e00c288f5f6cd550b174986f15519d0fae410cb2..5e5021223b120dd95a14276d89b670572e81a073 100644 (file)
@@ -838,8 +838,8 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args));      \
 static                                                                       \
 void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))              \
 {                                                                            \
-       struct lttng_event *__event = (struct lttng_event *) __tp_data;       \
-       struct lttng_channel *__chan = __event->chan;                         \
+       struct lttng_ust_event_recorder *__event_recorder = (struct lttng_ust_event_recorder *) __tp_data; \
+       struct lttng_channel *__chan = __event_recorder->chan;                \
        struct lttng_ust_lib_ring_buffer_ctx __ctx;                           \
        struct lttng_stack_ctx __lttng_ctx;                                   \
        size_t __event_len, __event_align;                                    \
@@ -859,17 +859,17 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))         \
                return;                                                       \
        if (caa_unlikely(!CMM_ACCESS_ONCE(__chan->enabled)))                  \
                return;                                                       \
-       if (caa_unlikely(!CMM_ACCESS_ONCE(__event->parent->enabled)))         \
+       if (caa_unlikely(!CMM_ACCESS_ONCE(__event_recorder->parent->enabled)))\
                return;                                                       \
        if (caa_unlikely(!TP_RCU_LINK_TEST()))                                \
                return;                                                       \
-       if (caa_unlikely(!cds_list_empty(&__event->parent->filter_bytecode_runtime_head))) { \
+       if (caa_unlikely(!cds_list_empty(&__event_recorder->parent->filter_bytecode_runtime_head))) { \
                struct lttng_bytecode_runtime *__filter_bc_runtime;                   \
-               int __filter_record = __event->parent->has_enablers_without_bytecode; \
+               int __filter_record = __event_recorder->parent->has_enablers_without_bytecode; \
                                                                              \
                __event_prepare_interpreter_stack__##_provider##___##_name(__stackvar.__filter_stack_data, \
                        _TP_ARGS_DATA_VAR(_args));                            \
-               tp_list_for_each_entry_rcu(__filter_bc_runtime, &__event->parent->filter_bytecode_runtime_head, node) { \
+               tp_list_for_each_entry_rcu(__filter_bc_runtime, &__event_recorder->parent->filter_bytecode_runtime_head, node) { \
                        if (caa_unlikely(__filter_bc_runtime->interpreter_funcs.filter(__filter_bc_runtime,     \
                                        __stackvar.__filter_stack_data) & LTTNG_INTERPRETER_RECORD_FLAG)) { \
                                __filter_record = 1;                          \
@@ -883,13 +883,13 @@ void __event_probe__##_provider##___##_name(_TP_ARGS_DATA_PROTO(_args))         \
                 _TP_ARGS_DATA_VAR(_args));                                   \
        __event_align = __event_get_align__##_provider##___##_name(_TP_ARGS_VAR(_args)); \
        memset(&__lttng_ctx, 0, sizeof(__lttng_ctx));                         \
-       __lttng_ctx.event = __event;                                          \
+       __lttng_ctx.event_recorder = __event_recorder;                        \
        __lttng_ctx.chan_ctx = tp_rcu_dereference(__chan->ctx);               \
-       __lttng_ctx.event_ctx = tp_rcu_dereference(__event->ctx);             \
-       lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event, __event_len,  \
+       __lttng_ctx.event_ctx = tp_rcu_dereference(__event_recorder->ctx);    \
+       lib_ring_buffer_ctx_init(&__ctx, __chan->chan, __event_recorder, __event_len,  \
                                 __event_align, -1, __chan->handle, &__lttng_ctx); \
        __ctx.ip = _TP_IP_PARAM(TP_IP_PARAM);                                 \
-       __ret = __chan->ops->event_reserve(&__ctx, __event->id);              \
+       __ret = __chan->ops->event_reserve(&__ctx, __event_recorder->id);     \
        if (__ret < 0)                                                        \
                return;                                                       \
        _fields                                                               \
index 5956f7bab45fe3a942f1219e229dc5a5f6585610..be666c7b7441a930ef34a3abcc6f3acb62e7a135 100644 (file)
@@ -608,9 +608,9 @@ void free_filter_runtime(struct cds_list_head *bytecode_runtime_head)
        }
 }
 
-void lttng_free_event_filter_runtime(struct lttng_event *event)
+void lttng_free_event_recorder_filter_runtime(struct lttng_ust_event_recorder *event_recorder)
 {
-       free_filter_runtime(&event->parent->filter_bytecode_runtime_head);
+       free_filter_runtime(&event_recorder->parent->filter_bytecode_runtime_head);
 }
 
 void lttng_free_event_notifier_filter_runtime(
index 508bf51d4e17aba385b30878a4c32be93372f4f2..0971f9eb2a7cb0bb03d72d2006a983cced5af7a2 100644 (file)
@@ -70,7 +70,7 @@ struct cds_list_head *lttng_get_sessions(void)
        return &sessions;
 }
 
-static void _lttng_event_destroy(struct lttng_event *event);
+static void _lttng_event_recorder_destroy(struct lttng_ust_event_recorder *event_recorder);
 static void _lttng_event_notifier_destroy(
                struct lttng_event_notifier *event_notifier);
 static void _lttng_enum_destroy(struct lttng_enum *_enum);
@@ -249,19 +249,19 @@ void _lttng_channel_unmap(struct lttng_channel *lttng_chan)
 }
 
 static
-void register_event(struct lttng_event *event)
+void register_event_recorder(struct lttng_ust_event_recorder *event_recorder)
 {
        int ret;
        const struct lttng_event_desc *desc;
 
-       assert(event->parent->priv->registered == 0);
-       desc = event->parent->priv->desc;
+       assert(event_recorder->parent->priv->registered == 0);
+       desc = event_recorder->parent->priv->desc;
        ret = __tracepoint_probe_register_queue_release(desc->name,
                        desc->probe_callback,
-                       event, desc->signature);
+                       event_recorder, desc->signature);
        WARN_ON_ONCE(ret);
        if (!ret)
-               event->parent->priv->registered = 1;
+               event_recorder->parent->priv->registered = 1;
 }
 
 static
@@ -280,19 +280,19 @@ void register_event_notifier(struct lttng_event_notifier *event_notifier)
 }
 
 static
-void unregister_event(struct lttng_event *event)
+void unregister_event_recorder(struct lttng_ust_event_recorder *event_recorder)
 {
        int ret;
        const struct lttng_event_desc *desc;
 
-       assert(event->parent->priv->registered == 1);
-       desc = event->parent->priv->desc;
+       assert(event_recorder->parent->priv->registered == 1);
+       desc = event_recorder->parent->priv->desc;
        ret = __tracepoint_probe_unregister_queue_release(desc->name,
                        desc->probe_callback,
-                       event);
+                       event_recorder);
        WARN_ON_ONCE(ret);
        if (!ret)
-               event->parent->priv->registered = 0;
+               event_recorder->parent->priv->registered = 0;
 }
 
 static
@@ -314,10 +314,10 @@ void unregister_event_notifier(struct lttng_event_notifier *event_notifier)
  * Only used internally at session destruction.
  */
 static
-void _lttng_event_unregister(struct lttng_event *event)
+void _lttng_event_recorder_unregister(struct lttng_ust_event_recorder *event_recorder)
 {
-       if (event->parent->priv->registered)
-               unregister_event(event);
+       if (event_recorder->parent->priv->registered)
+               unregister_event_recorder(event_recorder);
 }
 
 /*
@@ -333,22 +333,22 @@ void _lttng_event_notifier_unregister(struct lttng_event_notifier *event_notifie
 void lttng_session_destroy(struct lttng_session *session)
 {
        struct lttng_channel *chan, *tmpchan;
-       struct lttng_ust_event_private *event_priv, *tmpevent_priv;
+       struct lttng_ust_event_recorder_private *event_recorder_priv, *tmpevent_recorder_priv;
        struct lttng_enum *_enum, *tmp_enum;
        struct lttng_event_enabler *event_enabler, *event_tmpenabler;
 
        CMM_ACCESS_ONCE(session->active) = 0;
-       cds_list_for_each_entry(event_priv, &session->priv->events_head, node) {
-               _lttng_event_unregister(event_priv->pub);
+       cds_list_for_each_entry(event_recorder_priv, &session->priv->events_head, node) {
+               _lttng_event_recorder_unregister(event_recorder_priv->pub);
        }
        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->priv->enablers_head, node)
                lttng_event_enabler_destroy(event_enabler);
-       cds_list_for_each_entry_safe(event_priv, tmpevent_priv,
+       cds_list_for_each_entry_safe(event_recorder_priv, tmpevent_recorder_priv,
                        &session->priv->events_head, node)
-               _lttng_event_destroy(event_priv->pub);
+               _lttng_event_recorder_destroy(event_recorder_priv->pub);
        cds_list_for_each_entry_safe(_enum, tmp_enum,
                        &session->priv->enums_head, node)
                _lttng_enum_destroy(_enum);
@@ -737,11 +737,11 @@ struct cds_hlist_head *borrow_hash_table_bucket(
  * Supports event creation while tracing session is active.
  */
 static
-int lttng_event_create(const struct lttng_event_desc *desc,
+int lttng_event_recorder_create(const struct lttng_event_desc *desc,
                struct lttng_channel *chan)
 {
-       struct lttng_event *event;
-       struct lttng_ust_event_private *event_priv;
+       struct lttng_ust_event_recorder *event_recorder;
+       struct lttng_ust_event_recorder_private *event_recorder_priv;
        struct lttng_session *session = chan->session;
        struct cds_hlist_head *head;
        int ret = 0;
@@ -767,41 +767,41 @@ int lttng_event_create(const struct lttng_event_desc *desc,
        /*
         * Check if loglevel match. Refuse to connect event if not.
         */
-       event = zmalloc(sizeof(struct lttng_event));
-       if (!event) {
+       event_recorder = zmalloc(sizeof(struct lttng_ust_event_recorder));
+       if (!event_recorder) {
                ret = -ENOMEM;
                goto cache_error;
        }
-       event->struct_size = sizeof(struct lttng_event);
+       event_recorder->struct_size = sizeof(struct lttng_ust_event_recorder);
 
-       event->parent = zmalloc(sizeof(struct lttng_event_common));
-       if (!event->parent) {
+       event_recorder->parent = zmalloc(sizeof(struct lttng_event_common));
+       if (!event_recorder->parent) {
                ret = -ENOMEM;
                goto parent_error;
        }
-       event->parent->struct_size = sizeof(struct lttng_event_common);
+       event_recorder->parent->struct_size = sizeof(struct lttng_event_common);
 
-       event_priv = zmalloc(sizeof(struct lttng_ust_event_private));
-       if (!event_priv) {
+       event_recorder_priv = zmalloc(sizeof(struct lttng_ust_event_recorder_private));
+       if (!event_recorder_priv) {
                ret = -ENOMEM;
                goto priv_error;
        }
-       event->priv = event_priv;
-       event_priv->pub = event;
-       event->parent->priv = &event_priv->parent;
-       event_priv->parent.pub = event->parent;
+       event_recorder->priv = event_recorder_priv;
+       event_recorder_priv->pub = event_recorder;
+       event_recorder->parent->priv = &event_recorder_priv->parent;
+       event_recorder_priv->parent.pub = event_recorder->parent;
 
-       event->chan = chan;
+       event_recorder->chan = chan;
 
        /* Event will be enabled by enabler sync. */
-       event->parent->enabled = 0;
-       event->parent->priv->registered = 0;
-       CDS_INIT_LIST_HEAD(&event->parent->filter_bytecode_runtime_head);
-       CDS_INIT_LIST_HEAD(&event->parent->priv->enablers_ref_head);
-       event->parent->priv->desc = desc;
+       event_recorder->parent->enabled = 0;
+       event_recorder->parent->priv->registered = 0;
+       CDS_INIT_LIST_HEAD(&event_recorder->parent->filter_bytecode_runtime_head);
+       CDS_INIT_LIST_HEAD(&event_recorder->parent->priv->enablers_ref_head);
+       event_recorder->parent->priv->desc = desc;
 
        if (desc->loglevel)
-               loglevel = *(*event->parent->priv->desc->loglevel);
+               loglevel = *(*event_recorder->parent->priv->desc->loglevel);
        else
                loglevel = TRACE_DEFAULT;
        if (desc->u.ext.model_emf_uri)
@@ -820,22 +820,22 @@ int lttng_event_create(const struct lttng_event_desc *desc,
                desc->nr_fields,
                desc->fields,
                uri,
-               &event->id);
+               &event_recorder->id);
        if (ret < 0) {
                DBG("Error (%d) registering event to sessiond", ret);
                goto sessiond_register_error;
        }
 
-       cds_list_add(&event->priv->node, &chan->session->priv->events_head);
-       cds_hlist_add_head(&event->priv->hlist, head);
+       cds_list_add(&event_recorder->priv->node, &chan->session->priv->events_head);
+       cds_hlist_add_head(&event_recorder->priv->hlist, head);
        return 0;
 
 sessiond_register_error:
-       free(event_priv);
+       free(event_recorder_priv);
 priv_error:
-       free(event->parent);
+       free(event_recorder->parent);
 parent_error:
-       free(event);
+       free(event_recorder);
 cache_error:
 create_enum_error:
 socket_error:
@@ -995,11 +995,11 @@ int lttng_desc_match_enabler(const struct lttng_event_desc *desc,
 
 static
 int lttng_event_enabler_match_event(struct lttng_event_enabler *event_enabler,
-               struct lttng_event *event)
+               struct lttng_ust_event_recorder *event_recorder)
 {
-       if (lttng_desc_match_enabler(event->parent->priv->desc,
+       if (lttng_desc_match_enabler(event_recorder->parent->priv->desc,
                        lttng_event_enabler_as_enabler(event_enabler))
-                       && event->chan == event_enabler->chan)
+                       && event_recorder->chan == event_enabler->chan)
                return 1;
        else
                return 0;
@@ -1044,7 +1044,7 @@ void lttng_create_event_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_event_private *event_priv;
+       struct lttng_ust_event_recorder_private *event_recorder_priv;
        int i;
        struct cds_list_head *probe_list;
 
@@ -1070,9 +1070,9 @@ void lttng_create_event_if_missing(struct lttng_event_enabler *event_enabler)
                                session->priv->events_ht.table,
                                LTTNG_UST_EVENT_HT_SIZE, desc);
 
-                       cds_hlist_for_each_entry(event_priv, node, head, hlist) {
-                               if (event_priv->parent.desc == desc
-                                               && event_priv->pub->chan == event_enabler->chan) {
+                       cds_hlist_for_each_entry(event_recorder_priv, node, head, hlist) {
+                               if (event_recorder_priv->parent.desc == desc
+                                               && event_recorder_priv->pub->chan == event_enabler->chan) {
                                        found = true;
                                        break;
                                }
@@ -1084,7 +1084,7 @@ void lttng_create_event_if_missing(struct lttng_event_enabler *event_enabler)
                         * We need to create an event for this
                         * event probe.
                         */
-                       ret = lttng_event_create(probe_desc->event_desc[i],
+                       ret = lttng_event_recorder_create(probe_desc->event_desc[i],
                                        event_enabler->chan);
                        if (ret) {
                                DBG("Unable to create event %s, error %d\n",
@@ -1097,7 +1097,7 @@ void lttng_create_event_if_missing(struct lttng_event_enabler *event_enabler)
 static
 void probe_provider_event_for_each(struct lttng_probe_desc *provider_desc,
                void (*event_func)(struct lttng_session *session,
-                       struct lttng_event *event),
+                       struct lttng_ust_event_recorder *event_recorder),
                void (*event_notifier_func)(struct lttng_event_notifier *event_notifier))
 {
        struct cds_hlist_node *node, *tmp_node;
@@ -1117,7 +1117,7 @@ void probe_provider_event_for_each(struct lttng_probe_desc *provider_desc,
                struct lttng_event_notifier *event_notifier;
                struct lttng_ust_session_private *session_priv;
                struct cds_hlist_head *head;
-               struct lttng_ust_event_private *event_priv;
+               struct lttng_ust_event_recorder_private *event_recorder_priv;
 
                event_desc = provider_desc->event_desc[i];
 
@@ -1134,9 +1134,9 @@ void probe_provider_event_for_each(struct lttng_probe_desc *provider_desc,
                                session_priv->events_ht.table,
                                LTTNG_UST_EVENT_HT_SIZE, event_desc);
 
-                       cds_hlist_for_each_entry_safe(event_priv, node, tmp_node, head, hlist) {
-                               if (event_desc == event_priv->parent.desc) {
-                                       event_func(session_priv->pub, event_priv->pub);
+                       cds_hlist_for_each_entry_safe(event_recorder_priv, node, tmp_node, head, hlist) {
+                               if (event_desc == event_recorder_priv->parent.desc) {
+                                       event_func(session_priv->pub, event_recorder_priv->pub);
                                        break;
                                }
                        }
@@ -1167,25 +1167,25 @@ void probe_provider_event_for_each(struct lttng_probe_desc *provider_desc,
 }
 
 static
-void _unregister_event(struct lttng_session *session,
-               struct lttng_event *event)
+void _unregister_event_recorder(struct lttng_session *session,
+               struct lttng_ust_event_recorder *event_recorder)
 {
-       _lttng_event_unregister(event);
+       _lttng_event_recorder_unregister(event_recorder);
 }
 
 static
 void _event_enum_destroy(struct lttng_session *session,
-               struct lttng_event *event)
+               struct lttng_ust_event_recorder *event_recorder)
 {
        unsigned int i;
 
        /* Destroy enums of the current event. */
-       for (i = 0; i < event->parent->priv->desc->nr_fields; i++) {
+       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;
                struct lttng_enum *curr_enum;
 
-               field = &(event->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;
@@ -1201,7 +1201,7 @@ void _event_enum_destroy(struct lttng_session *session,
        }
 
        /* Destroy event. */
-       _lttng_event_destroy(event);
+       _lttng_event_recorder_destroy(event_recorder);
 }
 
 /*
@@ -1216,7 +1216,7 @@ void lttng_probe_provider_unregister_events(
         * Iterate over all events in the probe provider descriptions and sessions
         * to queue the unregistration of the events.
         */
-       probe_provider_event_for_each(provider_desc, _unregister_event,
+       probe_provider_event_for_each(provider_desc, _unregister_event_recorder,
                _lttng_event_notifier_unregister);
 
        /* Wait for grace period. */
@@ -1240,7 +1240,7 @@ static
 int lttng_event_enabler_ref_events(struct lttng_event_enabler *event_enabler)
 {
        struct lttng_session *session = event_enabler->chan->session;
-       struct lttng_ust_event_private *event_priv;
+       struct lttng_ust_event_recorder_private *event_recorder_priv;
 
        if (!lttng_event_enabler_as_enabler(event_enabler)->enabled)
                goto end;
@@ -1249,13 +1249,13 @@ int lttng_event_enabler_ref_events(struct lttng_event_enabler *event_enabler)
        lttng_create_event_if_missing(event_enabler);
 
        /* For each event matching enabler in session event list. */
-       cds_list_for_each_entry(event_priv, &session->priv->events_head, node) {
+       cds_list_for_each_entry(event_recorder_priv, &session->priv->events_head, node) {
                struct lttng_enabler_ref *enabler_ref;
 
-               if (!lttng_event_enabler_match_event(event_enabler, event_priv->pub))
+               if (!lttng_event_enabler_match_event(event_enabler, event_recorder_priv->pub))
                        continue;
 
-               enabler_ref = lttng_enabler_ref(&event_priv->parent.enablers_ref_head,
+               enabler_ref = lttng_enabler_ref(&event_recorder_priv->parent.enablers_ref_head,
                        lttng_event_enabler_as_enabler(event_enabler));
                if (!enabler_ref) {
                        /*
@@ -1268,15 +1268,15 @@ int lttng_event_enabler_ref_events(struct lttng_event_enabler *event_enabler)
                        enabler_ref->ref = lttng_event_enabler_as_enabler(
                                event_enabler);
                        cds_list_add(&enabler_ref->node,
-                               &event_priv->parent.enablers_ref_head);
+                               &event_recorder_priv->parent.enablers_ref_head);
                }
 
                /*
                 * Link filter bytecodes if not linked yet.
                 */
-               lttng_enabler_link_bytecode(event_priv->parent.desc,
+               lttng_enabler_link_bytecode(event_recorder_priv->parent.desc,
                        &session->priv->ctx,
-                       &event_priv->pub->parent->filter_bytecode_runtime_head,
+                       &event_recorder_priv->pub->parent->filter_bytecode_runtime_head,
                        &lttng_event_enabler_as_enabler(event_enabler)->filter_bytecode_head);
 
                /* TODO: merge event context. */
@@ -1342,24 +1342,24 @@ end:
  * Only used internally at session destruction.
  */
 static
-void _lttng_event_destroy(struct lttng_event *event)
+void _lttng_event_recorder_destroy(struct lttng_ust_event_recorder *event_recorder)
 {
        struct lttng_enabler_ref *enabler_ref, *tmp_enabler_ref;
 
        /* Remove from event list. */
-       cds_list_del(&event->priv->node);
+       cds_list_del(&event_recorder->priv->node);
        /* Remove from event hash table. */
-       cds_hlist_del(&event->priv->hlist);
+       cds_hlist_del(&event_recorder->priv->hlist);
 
-       lttng_destroy_context(event->ctx);
-       lttng_free_event_filter_runtime(event);
+       lttng_destroy_context(event_recorder->ctx);
+       lttng_free_event_recorder_filter_runtime(event_recorder);
        /* Free event enabler refs */
        cds_list_for_each_entry_safe(enabler_ref, tmp_enabler_ref,
-                       &event->parent->priv->enablers_ref_head, node)
+                       &event_recorder->parent->priv->enablers_ref_head, node)
                free(enabler_ref);
-       free(event->priv);
-       free(event->parent);
-       free(event);
+       free(event_recorder->priv);
+       free(event_recorder->parent);
+       free(event_recorder);
 }
 
 static
@@ -1658,7 +1658,7 @@ static
 void lttng_session_sync_event_enablers(struct lttng_session *session)
 {
        struct lttng_event_enabler *event_enabler;
-       struct lttng_ust_event_private *event_priv;
+       struct lttng_ust_event_recorder_private *event_recorder_priv;
 
        cds_list_for_each_entry(event_enabler, &session->priv->enablers_head, node)
                lttng_event_enabler_ref_events(event_enabler);
@@ -1667,14 +1667,14 @@ void lttng_session_sync_event_enablers(struct lttng_session *session)
         * and its channel and session transient states are enabled, we
         * enable the event, else we disable it.
         */
-       cds_list_for_each_entry(event_priv, &session->priv->events_head, node) {
+       cds_list_for_each_entry(event_recorder_priv, &session->priv->events_head, node) {
                struct lttng_enabler_ref *enabler_ref;
                struct lttng_bytecode_runtime *runtime;
                int enabled = 0, has_enablers_without_bytecode = 0;
 
                /* Enable events */
                cds_list_for_each_entry(enabler_ref,
-                               &event_priv->parent.enablers_ref_head, node) {
+                               &event_recorder_priv->parent.enablers_ref_head, node) {
                        if (enabler_ref->ref->enabled) {
                                enabled = 1;
                                break;
@@ -1685,36 +1685,36 @@ void lttng_session_sync_event_enablers(struct lttng_session *session)
                 * intesection of session and channel transient enable
                 * states.
                 */
-               enabled = enabled && session->priv->tstate && event_priv->pub->chan->tstate;
+               enabled = enabled && session->priv->tstate && event_recorder_priv->pub->chan->tstate;
 
-               CMM_STORE_SHARED(event_priv->pub->parent->enabled, enabled);
+               CMM_STORE_SHARED(event_recorder_priv->pub->parent->enabled, enabled);
                /*
                 * Sync tracepoint registration with event enabled
                 * state.
                 */
                if (enabled) {
-                       if (!event_priv->parent.registered)
-                               register_event(event_priv->pub);
+                       if (!event_recorder_priv->parent.registered)
+                               register_event_recorder(event_recorder_priv->pub);
                } else {
-                       if (event_priv->parent.registered)
-                               unregister_event(event_priv->pub);
+                       if (event_recorder_priv->parent.registered)
+                               unregister_event_recorder(event_recorder_priv->pub);
                }
 
                /* Check if has enablers without bytecode enabled */
                cds_list_for_each_entry(enabler_ref,
-                               &event_priv->parent.enablers_ref_head, node) {
+                               &event_recorder_priv->parent.enablers_ref_head, node) {
                        if (enabler_ref->ref->enabled
                                        && cds_list_empty(&enabler_ref->ref->filter_bytecode_head)) {
                                has_enablers_without_bytecode = 1;
                                break;
                        }
                }
-               event_priv->pub->parent->has_enablers_without_bytecode =
+               event_recorder_priv->pub->parent->has_enablers_without_bytecode =
                        has_enablers_without_bytecode;
 
                /* Enable filters */
                cds_list_for_each_entry(runtime,
-                               &event_priv->pub->parent->filter_bytecode_runtime_head, node) {
+                               &event_recorder_priv->pub->parent->filter_bytecode_runtime_head, node) {
                        lttng_bytecode_filter_sync_state(runtime);
                }
        }
@@ -1973,7 +1973,7 @@ void lttng_ust_context_set_session_provider(const char *name,
 
        cds_list_for_each_entry(session_priv, &sessions, node) {
                struct lttng_channel *chan;
-               struct lttng_ust_event_private *event_priv;
+               struct lttng_ust_event_recorder_private *event_recorder_priv;
                int ret;
 
                ret = lttng_ust_context_set_provider_rcu(&session_priv->ctx,
@@ -1986,8 +1986,8 @@ void lttng_ust_context_set_session_provider(const char *name,
                        if (ret)
                                abort();
                }
-               cds_list_for_each_entry(event_priv, &session_priv->events_head, node) {
-                       ret = lttng_ust_context_set_provider_rcu(&event_priv->pub->ctx,
+               cds_list_for_each_entry(event_recorder_priv, &session_priv->events_head, node) {
+                       ret = lttng_ust_context_set_provider_rcu(&event_recorder_priv->pub->ctx,
                                        name, get_size, record, get_value);
                        if (ret)
                                abort();
index 80e0b95a36b5ad08616d01e1a2a0fa63f206ba04..cac61343acc8723f714d0e794bbe6439bcf5716c 100644 (file)
@@ -172,7 +172,7 @@ size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
                                 struct lttng_client_ctx *client_ctx)
 {
        struct lttng_channel *lttng_chan = channel_get_private(chan);
-       struct lttng_event *event = ctx->priv;
+       struct lttng_ust_event_recorder *event_recorder = ctx->priv;
        struct lttng_stack_ctx *lttng_ctx = ctx->priv2;
        size_t orig_offset = offset;
        size_t padding;
@@ -222,7 +222,7 @@ size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
                /* Pre 2.8 probe ABI. */
                offset += ctx_get_aligned_size(offset, lttng_chan->ctx,
                                client_ctx->packet_context_len);
-               offset += ctx_get_aligned_size(offset, event->ctx,
+               offset += ctx_get_aligned_size(offset, event_recorder->ctx,
                                client_ctx->event_context_len);
        }
        *pre_header_padding = padding;
@@ -252,7 +252,7 @@ void lttng_write_event_header(const struct lttng_ust_lib_ring_buffer_config *con
                            uint32_t event_id)
 {
        struct lttng_channel *lttng_chan = channel_get_private(ctx->chan);
-       struct lttng_event *event = ctx->priv;
+       struct lttng_ust_event_recorder *event_recorder = ctx->priv;
        struct lttng_stack_ctx *lttng_ctx = ctx->priv2;
 
        if (caa_unlikely(ctx->rflags))
@@ -295,7 +295,7 @@ void lttng_write_event_header(const struct lttng_ust_lib_ring_buffer_config *con
        } else {
                /* Pre 2.8 probe ABI. */
                ctx_record(ctx, lttng_chan, lttng_chan->ctx, APP_CTX_DISABLED);
-               ctx_record(ctx, lttng_chan, event->ctx, APP_CTX_DISABLED);
+               ctx_record(ctx, lttng_chan, event_recorder->ctx, APP_CTX_DISABLED);
        }
        lib_ring_buffer_align_ctx(ctx, ctx->largest_align);
 
@@ -311,7 +311,7 @@ void lttng_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config
                                 uint32_t event_id)
 {
        struct lttng_channel *lttng_chan = channel_get_private(ctx->chan);
-       struct lttng_event *event = ctx->priv;
+       struct lttng_ust_event_recorder *event_recorder = ctx->priv;
        struct lttng_stack_ctx *lttng_ctx = ctx->priv2;
 
        switch (lttng_chan->header_type) {
@@ -376,7 +376,7 @@ void lttng_write_event_header_slow(const struct lttng_ust_lib_ring_buffer_config
        } else {
                /* Pre 2.8 probe ABI. */
                ctx_record(ctx, lttng_chan, lttng_chan->ctx, APP_CTX_DISABLED);
-               ctx_record(ctx, lttng_chan, event->ctx, APP_CTX_DISABLED);
+               ctx_record(ctx, lttng_chan, event_recorder->ctx, APP_CTX_DISABLED);
        }
        lib_ring_buffer_align_ctx(ctx, ctx->largest_align);
 }
@@ -706,7 +706,7 @@ int lttng_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx,
                      uint32_t event_id)
 {
        struct lttng_channel *lttng_chan = channel_get_private(ctx->chan);
-       struct lttng_event *event = ctx->priv;
+       struct lttng_ust_event_recorder *event_recorder = ctx->priv;
        struct lttng_stack_ctx *lttng_ctx = ctx->priv2;
        struct lttng_client_ctx client_ctx;
        int ret, cpu;
@@ -723,7 +723,7 @@ int lttng_event_reserve(struct lttng_ust_lib_ring_buffer_ctx *ctx,
                /* Pre 2.8 probe ABI. */
                ctx_get_struct_size(lttng_chan->ctx, &client_ctx.packet_context_len,
                                APP_CTX_DISABLED);
-               ctx_get_struct_size(event->ctx, &client_ctx.event_context_len,
+               ctx_get_struct_size(event_recorder->ctx, &client_ctx.event_context_len,
                                APP_CTX_DISABLED);
        }
 
index ea62e029bc7f697967218fd7758c3acec5b6e965..45c581b178607c67bacebbcf770af7b4facfe355 100644 (file)
@@ -174,12 +174,12 @@ struct lttng_ust_event_common_private {
        int registered;                 /* has reg'd tracepoint probe */
 };
 
-struct lttng_ust_event_private {
+struct lttng_ust_event_recorder_private {
        struct lttng_ust_event_common_private parent;
 
-       struct lttng_event *pub;        /* Public event interface */
-       struct cds_list_head node;      /* Event list in session */
-       struct cds_hlist_node hlist;    /* session ht of events */
+       struct lttng_ust_event_recorder *pub;   /* Public event interface */
+       struct cds_list_head node;              /* Event list in session */
+       struct cds_hlist_node hlist;            /* session ht of events */
 };
 
 struct lttng_ust_bytecode_runtime_private {
@@ -383,7 +383,7 @@ int lttng_event_notifier_enabler_attach_exclusion(
                struct lttng_ust_excluder_node **excluder);
 
 LTTNG_HIDDEN
-void lttng_free_event_filter_runtime(struct lttng_event *event);
+void lttng_free_event_recorder_filter_runtime(struct lttng_ust_event_recorder *event_recorder);
 
 LTTNG_HIDDEN
 void lttng_free_event_notifier_filter_runtime(
This page took 0.040802 seconds and 4 git commands to generate.