consumerd: send a buffer static sample on flush command
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.cpp
index 0340434448e7be0350a1db630f5eea9b63b44a9f..30d1f102142781289be72a965a9b8bfe719486ff 100644 (file)
@@ -702,6 +702,14 @@ static int flush_channel(uint64_t chan_key)
 next:
                pthread_mutex_unlock(&stream->lock);
        }
+
+       /*
+        * Send one last buffer statistics update to the session daemon. This
+        * ensures that the session daemon gets at least one statistics update
+        * per channel even in the case of short-lived channels, such as when a
+        * short-lived app is traced in per-pid mode.
+        */
+       sample_and_send_channel_buffer_stats(channel);
 error:
        rcu_read_unlock();
        return ret;
This page took 0.022678 seconds and 4 git commands to generate.