From: Julien Desfossez Date: Mon, 11 Dec 2017 21:56:17 +0000 (-0500) Subject: Add ustctl_flush_buffer to the consumer API X-Git-Tag: v2.11.0-rc1~355 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=fc6d7a51ee49245f1c24cc33f05a4a8983028f8c;p=lttng-tools.git Add ustctl_flush_buffer to the consumer API Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/ust-consumer/ust-consumer.c b/src/common/ust-consumer/ust-consumer.c index 00937a44d..775cb1766 100644 --- a/src/common/ust-consumer/ust-consumer.c +++ b/src/common/ust-consumer/ust-consumer.c @@ -2044,6 +2044,15 @@ void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream) return ustctl_get_mmap_base(stream->ustream); } +void lttng_ustctl_flush_buffer(struct lttng_consumer_stream *stream, + int producer_active) +{ + assert(stream); + assert(stream->ustream); + + ustctl_flush_buffer(stream->ustream, producer_active); +} + /* * Take a snapshot for a specific stream. * diff --git a/src/common/ust-consumer/ust-consumer.h b/src/common/ust-consumer/ust-consumer.h index b5ff16186..b29fe318b 100644 --- a/src/common/ust-consumer/ust-consumer.h +++ b/src/common/ust-consumer/ust-consumer.h @@ -52,6 +52,8 @@ void lttng_ustconsumer_on_stream_hangup(struct lttng_consumer_stream *stream); int lttng_ustctl_get_mmap_read_offset(struct lttng_consumer_stream *stream, unsigned long *off); void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream); +void lttng_ustctl_flush_buffer(struct lttng_consumer_stream *stream, + int producer_active); int lttng_ustconsumer_get_stream_id(struct lttng_consumer_stream *stream, uint64_t *stream_id); int lttng_ustconsumer_data_pending(struct lttng_consumer_stream *stream); @@ -188,6 +190,11 @@ void *lttng_ustctl_get_mmap_base(struct lttng_consumer_stream *stream) return NULL; } static inline +void lttng_ustctl_flush_buffer(struct lttng_consumer_stream *stream, + int producer_active) +{ +} +static inline void lttng_ustconsumer_close_all_metadata(struct lttng_ht *ht) { }