X-Git-Url: https://git.liburcu.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fust-consumer%2Fust-consumer.cpp;fp=src%2Fcommon%2Fust-consumer%2Fust-consumer.cpp;h=30d1f102142781289be72a965a9b8bfe719486ff;hp=0340434448e7be0350a1db630f5eea9b63b44a9f;hb=9cc4ae91845c03b141af7ef58a86a2a9689dfafd;hpb=c715ddc950bf653d9456d92c6ead2e3cbd3c54ae diff --git a/src/common/ust-consumer/ust-consumer.cpp b/src/common/ust-consumer/ust-consumer.cpp index 034043444..30d1f1021 100644 --- a/src/common/ust-consumer/ust-consumer.cpp +++ b/src/common/ust-consumer/ust-consumer.cpp @@ -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;