DBG2("Trace destroy UST channel %s", channel->name);
- /* Destroying all events of the channel */
- destroy_events(channel->events);
- /* Destroying all context of the channel */
- destroy_contexts(channel->ctx);
-
free(channel);
}
void trace_ust_destroy_channel(struct ltt_ust_channel *channel)
{
+ /* Destroying all events of the channel */
+ destroy_events(channel->events);
+ /* Destroying all context of the channel */
+ destroy_contexts(channel->ctx);
+
call_rcu(&channel->node.head, destroy_channel_rcu);
}
*/
static void destroy_channels(struct lttng_ht *channels)
{
- int ret;
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
assert(channels);
rcu_read_lock();
-
cds_lfht_for_each_entry(channels->ht, &iter.iter, node, node) {
- ret = lttng_ht_del(channels, &iter);
- assert(!ret);
- call_rcu(&node->head, destroy_channel_rcu);
+ struct ltt_ust_channel *chan =
+ caa_container_of(node, struct ltt_ust_channel, node);
+
+ trace_ust_delete_channel(channels, chan);
+ trace_ust_destroy_channel(chan);
}
rcu_read_unlock();