From fc6d7a51ee49245f1c24cc33f05a4a8983028f8c Mon Sep 17 00:00:00 2001 From: Julien Desfossez Date: Mon, 11 Dec 2017 16:56:17 -0500 Subject: [PATCH] Add ustctl_flush_buffer to the consumer API MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Julien Desfossez Signed-off-by: Jérémie Galarneau --- src/common/ust-consumer/ust-consumer.c | 9 +++++++++ src/common/ust-consumer/ust-consumer.h | 7 +++++++ 2 files changed, 16 insertions(+) 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) { } -- 2.34.1