DBG("Live timer for channel %" PRIu64, channel->key);
{
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_for_each_entry_duplicate(ht->ht,
ht->hash_fct(&channel->key, lttng_ht_seed),
ht->match_fct,
*_total_consumed = 0;
- lttng::urcu::read_lock_guard read_lock;
+ const lttng::urcu::read_lock_guard read_lock;
cds_lfht_for_each_entry_duplicate(ht->ht,
ht->hash_fct(&channel->key, lttng_ht_seed),
void sample_and_send_channel_buffer_stats(struct lttng_consumer_channel *channel)
{
int ret;
- int channel_monitor_pipe = consumer_timer_thread_get_channel_monitor_pipe();
+ const int channel_monitor_pipe = consumer_timer_thread_get_channel_monitor_pipe();
struct lttcomm_consumer_channel_monitor_msg msg = {
.key = channel->key,
.session_id = channel->session_id,
msg.highest = highest;
msg.lowest = lowest;
- msg.consumed_since_last_sample = total_consumed - channel->last_consumed_size_sample_sent;
+ msg.consumed_since_last_sample =
+ total_consumed - channel->consumed_size_as_of_last_sample_sent;
/*
* Writes performed here are assumed to be atomic which is only
channel->key,
msg.highest,
msg.lowest);
- channel->last_consumed_size_sample_sent = msg.consumed_since_last_sample;
+ channel->consumed_size_as_of_last_sample_sent = total_consumed;
}
}