consumerd: send a buffer static sample on flush command
[lttng-tools.git] / src / common / consumer / consumer-timer.cpp
index 51fa1687e9359a2d0c9a09e77b4573e8dce6e0ce..4e308383d22e5a1c22e7f9442c5b9a9dc87d1020 100644 (file)
 #include <inttypes.h>
 #include <signal.h>
 
-#include <bin/lttng-consumerd/health-consumerd.h>
-#include <common/common.h>
-#include <common/compat/endian.h>
-#include <common/kernel-ctl/kernel-ctl.h>
-#include <common/kernel-consumer/kernel-consumer.h>
-#include <common/consumer/consumer-stream.h>
-#include <common/consumer/consumer-timer.h>
-#include <common/consumer/consumer-testpoint.h>
-#include <common/ust-consumer/ust-consumer.h>
+#include <bin/lttng-consumerd/health-consumerd.hpp>
+#include <common/common.hpp>
+#include <common/compat/endian.hpp>
+#include <common/kernel-ctl/kernel-ctl.hpp>
+#include <common/kernel-consumer/kernel-consumer.hpp>
+#include <common/consumer/consumer-stream.hpp>
+#include <common/consumer/consumer-timer.hpp>
+#include <common/consumer/consumer-testpoint.hpp>
+#include <common/ust-consumer/ust-consumer.hpp>
 
 typedef int (*sample_positions_cb)(struct lttng_consumer_stream *stream);
 typedef int (*get_consumed_cb)(struct lttng_consumer_stream *stream,
@@ -637,11 +637,8 @@ 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 =
@@ -787,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;
This page took 0.023606 seconds and 4 git commands to generate.