X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-timer.cpp;h=4e308383d22e5a1c22e7f9442c5b9a9dc87d1020;hb=9cc4ae91845c03b141af7ef58a86a2a9689dfafd;hp=f6cb60c3b4e36912cc666709d29220e87fe1253a;hpb=97535efaa975ca52bf02c2d5e76351bfd2e3defa;p=lttng-tools.git diff --git a/src/common/consumer/consumer-timer.cpp b/src/common/consumer/consumer-timer.cpp index f6cb60c3b..4e308383d 100644 --- a/src/common/consumer/consumer-timer.cpp +++ b/src/common/consumer/consumer-timer.cpp @@ -10,15 +10,15 @@ #include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include +#include typedef int (*sample_positions_cb)(struct lttng_consumer_stream *stream); typedef int (*get_consumed_cb)(struct lttng_consumer_stream *stream, @@ -637,17 +637,17 @@ end: return ret; } -/* - * Execute action on a monitor timer. - */ -static -void monitor_timer(struct lttng_consumer_channel *channel) +/* Sample and send channel buffering statistics to the session daemon. */ +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(); struct lttcomm_consumer_channel_monitor_msg msg = { .key = channel->key, + .lowest = 0, + .highest = 0, + .total_consumed = 0, }; sample_positions_cb sample; get_consumed_cb get_consumed; @@ -784,7 +784,7 @@ void *consumer_timer_thread(void *data) struct lttng_consumer_channel *channel; channel = (lttng_consumer_channel *) info.si_value.sival_ptr; - monitor_timer(channel); + sample_and_send_channel_buffer_stats(channel); } else if (signr == LTTNG_CONSUMER_SIG_EXIT) { LTTNG_ASSERT(CMM_LOAD_SHARED(consumer_quit)); goto end;