consumer: implement clear channel
[lttng-tools.git] / src / common / consumer / consumer.h
index 72c580eb2e1be87894d98a4c40e83a09ce07b8a5..9dfa91353bd69108c573b5439d2b5d3dcdb31836 100644 (file)
@@ -70,6 +70,7 @@ enum lttng_consumer_command {
        LTTNG_CONSUMER_CREATE_TRACE_CHUNK,
        LTTNG_CONSUMER_CLOSE_TRACE_CHUNK,
        LTTNG_CONSUMER_TRACE_CHUNK_EXISTS,
+       LTTNG_CONSUMER_CLEAR_CHANNEL,
 };
 
 enum lttng_consumer_type {
@@ -304,6 +305,11 @@ struct lttng_consumer_stream {
         */
        bool quiescent;
 
+       /*
+        * True if the sequence number is not available (lttng-modules < 2.8).
+        */
+       bool sequence_number_unavailable;
+
        /*
         * metadata_timer_lock protects flags waiting_on_metadata and
         * missed_metadata_flush.
@@ -438,12 +444,12 @@ struct lttng_consumer_stream {
        pthread_mutex_t metadata_rdv_lock;
 
        /*
-        * rotate_position represents the position in the ring-buffer that has to
-        * be flushed to disk to complete the ongoing rotation. When that position
-        * is reached, this tracefile can be closed and a new one is created in
-        * channel_read_only_attributes.path.
+        * rotate_position represents the packet sequence number of the last
+        * packet which belongs to the current trace chunk prior to the rotation.
+        * When that position is reached, this tracefile can be closed and a
+        * new one is created in channel_read_only_attributes.path.
         */
-       unsigned long rotate_position;
+       uint64_t rotate_position;
 
        /*
         * Read-only copies of channel values. We cannot safely access the
@@ -870,5 +876,6 @@ void lttng_consumer_cleanup_relayd(struct consumer_relayd_sock_pair *relayd);
 enum lttcomm_return_code lttng_consumer_init_command(
                struct lttng_consumer_local_data *ctx,
                const lttng_uuid sessiond_uuid);
+int lttng_consumer_clear_channel(struct lttng_consumer_channel *channel);
 
 #endif /* LIB_CONSUMER_H */
This page took 0.024352 seconds and 5 git commands to generate.