X-Git-Url: https://git.liburcu.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer.h;h=e1a4b7e9e44f39f5bd9b60cc750ac78ef98feac3;hb=bec11ce9cd8cbf36ad6d58b79d5a37f4d78d9a14;hp=db5cbf6a01004710de022fae90bffff8e31bb53e;hpb=c228c2fc027cb854cd7f9bd1df0a24c878c70a1e;p=lttng-tools.git diff --git a/src/common/consumer/consumer.h b/src/common/consumer/consumer.h index db5cbf6a0..e1a4b7e9e 100644 --- a/src/common/consumer/consumer.h +++ b/src/common/consumer/consumer.h @@ -218,6 +218,8 @@ struct lttng_consumer_channel { uint64_t discarded_events; /* Total number of missed packets due to overwriting (overwrite). */ uint64_t lost_packets; + + bool streams_sent_to_relayd; }; /* @@ -337,9 +339,9 @@ struct lttng_consumer_stream { * Lock to use the stream FDs since they are used between threads. * * This is nested INSIDE the consumer_data lock. - * This is nested INSIDE the metadata cache lock. * This is nested INSIDE the channel lock. * This is nested INSIDE the channel timer lock. + * This is nested OUTSIDE the metadata cache lock. * This is nested OUTSIDE consumer_relayd_sock_pair lock. */ pthread_mutex_t lock; @@ -390,9 +392,9 @@ struct lttng_consumer_stream { /* Copy of the sequence number of the last packet extracted. */ uint64_t last_sequence_number; /* - * FD of the index file for this stream. + * Index file object of the index file for this stream. */ - int index_fd; + struct lttng_index_file *index_file; /* * Local pipe to extract data when using splice. @@ -591,6 +593,12 @@ struct lttng_consumer_global_data { struct lttng_ht *stream_per_chan_id_ht; }; +/* + * Set to nonzero when the consumer is exiting. Updated by signal + * handler and thread exit, read by threads. + */ +extern volatile int consumer_quit; + /* * Init consumer data structures. */ @@ -626,12 +634,6 @@ void lttng_consumer_should_exit(struct lttng_consumer_local_data *ctx); */ void lttng_consumer_cleanup(void); -/* - * Flush pending writes to trace output disk file. - */ -void lttng_consumer_sync_trace_file(struct lttng_consumer_stream *stream, - off_t orig_offset); - /* * Poll on the should_quit pipe and the command socket return -1 on error and * should exit, 0 if data is available on the command socket