We only do a single rcu_barrier() on teardown of sessiond. Therefore, if
we chain call_rcu, they may not all be executed before exit.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
DBG2("Trace destroy UST channel %s", channel->name);
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);
-
void trace_ust_destroy_channel(struct ltt_ust_channel *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);
}
call_rcu(&channel->node.head, destroy_channel_rcu);
}
*/
static void destroy_channels(struct lttng_ht *channels)
{
*/
static void destroy_channels(struct lttng_ht *channels)
{
struct lttng_ht_node_str *node;
struct lttng_ht_iter iter;
assert(channels);
rcu_read_lock();
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) {
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);