Ust consumer: Expose userspace clear buffer operation
[lttng-tools.git] / src / common / ust-consumer / ust-consumer.c
index b5435c10d681d9240040117fa267c919441701d5..8916daefa1a1b3f93769a46082c2c8cf5b8682f2 100644 (file)
@@ -1941,7 +1941,7 @@ int lttng_ustconsumer_recv_cmd(struct lttng_consumer_local_data *ctx,
                         * Sample the rotate position of all the streams in
                         * this channel.
                         */
-                       ret = lttng_consumer_rotate_channel(channel, key,
+                       ret = lttng_consumer_rotate_sample_channel(channel, key,
                                        msg.u.rotate_channel.pathname,
                                        msg.u.rotate_channel.relayd_id,
                                        msg.u.rotate_channel.metadata,
@@ -2255,6 +2255,14 @@ void lttng_ustconsumer_flush_buffer(struct lttng_consumer_stream *stream,
        ustctl_flush_buffer(stream->ustream, producer);
 }
 
+void lttng_ustconsumer_clear_buffer(struct lttng_consumer_stream *stream)
+{
+       assert(stream);
+       assert(stream->ustream);
+
+       ustctl_clear_buffer(stream->ustream);
+}
+
 int lttng_ustconsumer_get_current_timestamp(
                struct lttng_consumer_stream *stream, uint64_t *ts)
 {
This page took 0.024872 seconds and 5 git commands to generate.