From: Mathieu Desnoyers Date: Thu, 27 Jan 2022 19:14:54 +0000 (-0500) Subject: Rename session chan field to chan_head X-Git-Url: http://git.lttng.org./?a=commitdiff_plain;h=0d5e5f34732dfaa3e2c0032edf572188a0479663;p=lttng-modules.git Rename session chan field to chan_head Signed-off-by: Mathieu Desnoyers Change-Id: I4447978d05d2979e8c7e8c6d66126da66142e32c --- diff --git a/include/lttng/events-internal.h b/include/lttng/events-internal.h index 2067d3fe..0f715d2d 100644 --- a/include/lttng/events-internal.h +++ b/include/lttng/events-internal.h @@ -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 */ diff --git a/src/lttng-events.c b/src/lttng-events.c index 6ac97be5..bbd353a6 100644 --- a/src/lttng-events.c +++ b/src/lttng-events.c @@ -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;