Rename session chan field to chan_head
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Thu, 27 Jan 2022 19:14:54 +0000 (14:14 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 15 Jul 2024 20:58:48 +0000 (16:58 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I4447978d05d2979e8c7e8c6d66126da66142e32c

include/lttng/events-internal.h
src/lttng-events.c

index 2067d3fe04c0419e9a877537d8cebfccda9bc384..0f715d2d659cda5832e1b19d722ca770dbd5f964 100644 (file)
@@ -514,7 +514,7 @@ struct lttng_kernel_session_private {
 
        int been_active;                        /* Has trace session been active ? */
        struct file *file;                      /* File associated to session */
-       struct list_head chan;                  /* Channel list head */
+       struct list_head chan_head;             /* Channel list head */
        struct list_head events;                /* Event list head */
        struct list_head list;                  /* Session list */
        unsigned int free_chan_id;              /* Next chan ID to allocate */
index 6ac97be576d2207b5cc9335845638c2e0df99def..bbd353a60811dbf7a6586313e7d0da435dab305b 100644 (file)
@@ -159,7 +159,7 @@ struct lttng_kernel_session *lttng_session_create(void)
        session->priv = session_priv;
        session_priv->pub = session;
 
-       INIT_LIST_HEAD(&session_priv->chan);
+       INIT_LIST_HEAD(&session_priv->chan_head);
        INIT_LIST_HEAD(&session_priv->events);
        lttng_guid_gen(&session_priv->uuid);
 
@@ -355,14 +355,14 @@ void lttng_session_destroy(struct lttng_kernel_session *session)
 
        mutex_lock(&sessions_mutex);
        WRITE_ONCE(session->active, 0);
-       list_for_each_entry(chan_priv, &session->priv->chan, node) {
+       list_for_each_entry(chan_priv, &session->priv->chan_head, node) {
                ret = lttng_syscalls_unregister_syscall_table(&chan_priv->parent.syscall_table);
                WARN_ON(ret);
        }
        list_for_each_entry(event_recorder_priv, &session->priv->events, parent.parent.node)
                _lttng_event_unregister(&event_recorder_priv->pub->parent);
        synchronize_trace();    /* Wait for in-flight events to complete */
-       list_for_each_entry(chan_priv, &session->priv->chan, node) {
+       list_for_each_entry(chan_priv, &session->priv->chan_head, node) {
                ret = lttng_syscalls_destroy_syscall_table(&chan_priv->parent.syscall_table);
                WARN_ON(ret);
        }
@@ -370,7 +370,7 @@ void lttng_session_destroy(struct lttng_kernel_session *session)
                lttng_event_enabler_destroy(event_enabler);
        list_for_each_entry_safe(event_recorder_priv, tmpevent_recorder_priv, &session->priv->events, parent.parent.node)
                _lttng_event_destroy(&event_recorder_priv->pub->parent);
-       list_for_each_entry_safe(chan_priv, tmpchan_priv, &session->priv->chan, node) {
+       list_for_each_entry_safe(chan_priv, tmpchan_priv, &session->priv->chan_head, node) {
                BUG_ON(chan_priv->channel_type == METADATA_CHANNEL);
                _lttng_channel_destroy(chan_priv->pub);
        }
@@ -474,7 +474,7 @@ int lttng_session_enable(struct lttng_kernel_session *session)
         * Snapshot the number of events per channel to know the type of header
         * we need to use.
         */
-       list_for_each_entry(chan_priv, &session->priv->chan, node) {
+       list_for_each_entry(chan_priv, &session->priv->chan_head, node) {
                if (chan_priv->header_type)
                        continue;                       /* don't change it if session stop/restart */
                if (chan_priv->free_event_id < 31)
@@ -484,7 +484,7 @@ int lttng_session_enable(struct lttng_kernel_session *session)
        }
 
        /* Clear each stream's quiescent state. */
-       list_for_each_entry(chan_priv, &session->priv->chan, node) {
+       list_for_each_entry(chan_priv, &session->priv->chan_head, node) {
                if (chan_priv->channel_type != METADATA_CHANNEL)
                        lib_ring_buffer_clear_quiescent_channel(chan_priv->rb_chan);
        }
@@ -521,7 +521,7 @@ int lttng_session_disable(struct lttng_kernel_session *session)
        lttng_session_sync_event_enablers(session);
 
        /* Set each stream's quiescent state. */
-       list_for_each_entry(chan_priv, &session->priv->chan, node) {
+       list_for_each_entry(chan_priv, &session->priv->chan_head, node) {
                if (chan_priv->channel_type != METADATA_CHANNEL)
                        lib_ring_buffer_set_quiescent_channel(chan_priv->rb_chan);
        }
@@ -555,7 +555,7 @@ int lttng_session_metadata_regenerate(struct lttng_kernel_session *session)
        mutex_unlock(&cache->lock);
 
        session->priv->metadata_dumped = 0;
-       list_for_each_entry(chan_priv, &session->priv->chan, node) {
+       list_for_each_entry(chan_priv, &session->priv->chan_head, node) {
                chan_priv->metadata_dumped = 0;
        }
 
@@ -808,7 +808,7 @@ struct lttng_kernel_channel_buffer *lttng_channel_buffer_create(struct lttng_ker
        chan->parent.enabled = 1;
        chan->priv->transport = transport;
        chan->priv->channel_type = channel_type;
-       list_add(&chan->priv->node, &session->priv->chan);
+       list_add(&chan->priv->node, &session->priv->chan_head);
        mutex_unlock(&sessions_mutex);
        return chan;
 
@@ -3923,7 +3923,7 @@ int _lttng_session_metadata_statedump(struct lttng_kernel_session *session)
                goto end;
 
 skip_session:
-       list_for_each_entry(chan_priv, &session->priv->chan, node) {
+       list_for_each_entry(chan_priv, &session->priv->chan_head, node) {
                ret = _lttng_channel_metadata_statedump(session, chan_priv->pub);
                if (ret)
                        goto end;
This page took 0.030863 seconds and 4 git commands to generate.