X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-stream.hpp;fp=src%2Fcommon%2Fconsumer%2Fconsumer-stream.hpp;h=97fbd145b1a95d0ac749b2a9157ec7f2dbaf09e8;hb=28f23191dcbf047429d51950a337a57d7a3f866a;hp=ae43f732259a92aea78146b8621cf709eb90f23c;hpb=f250b40e2179eccdb83766bf4abef5a35036c47b;p=lttng-tools.git diff --git a/src/common/consumer/consumer-stream.hpp b/src/common/consumer/consumer-stream.hpp index ae43f7322..97fbd145b 100644 --- a/src/common/consumer/consumer-stream.hpp +++ b/src/common/consumer/consumer-stream.hpp @@ -21,18 +21,17 @@ enum consumer_stream_open_packet_status { * * The channel lock MUST be acquired. */ -struct lttng_consumer_stream *consumer_stream_create( - struct lttng_consumer_channel *channel, - uint64_t channel_key, - uint64_t stream_key, - const char *channel_name, - uint64_t relayd_id, - uint64_t session_id, - struct lttng_trace_chunk *trace_chunk, - int cpu, - int *alloc_ret, - enum consumer_channel_type type, - unsigned int monitor); +struct lttng_consumer_stream *consumer_stream_create(struct lttng_consumer_channel *channel, + uint64_t channel_key, + uint64_t stream_key, + const char *channel_name, + uint64_t relayd_id, + uint64_t session_id, + struct lttng_trace_chunk *trace_chunk, + int cpu, + int *alloc_ret, + enum consumer_channel_type type, + unsigned int monitor); /* * Close stream's file descriptors and, if needed, close stream also on the @@ -51,15 +50,14 @@ void consumer_stream_close_output(struct lttng_consumer_stream *stream); * a hash table before calling this. */ void consumer_stream_relayd_close(struct lttng_consumer_stream *stream, - struct consumer_relayd_sock_pair *relayd); + struct consumer_relayd_sock_pair *relayd); /* * Delete the stream from all possible hash tables. * * The consumer data lock MUST be acquired. */ -void consumer_stream_delete(struct lttng_consumer_stream *stream, - struct lttng_ht *ht); +void consumer_stream_delete(struct lttng_consumer_stream *stream, struct lttng_ht *ht); /* * Free the given stream within a RCU call. @@ -73,8 +71,7 @@ void consumer_stream_free(struct lttng_consumer_stream *stream); * * This MUST be called WITHOUT the consumer data and stream lock acquired. */ -void consumer_stream_destroy(struct lttng_consumer_stream *stream, - struct lttng_ht *ht); +void consumer_stream_destroy(struct lttng_consumer_stream *stream, struct lttng_ht *ht); /* * Destroy the stream's buffers on the tracer side. This is also called in a @@ -86,18 +83,16 @@ void consumer_stream_destroy_buffers(struct lttng_consumer_stream *stream); * Write index of a specific stream either on the relayd or local disk. */ int consumer_stream_write_index(struct lttng_consumer_stream *stream, - struct ctf_packet_index *index); + struct ctf_packet_index *index); -int consumer_stream_sync_metadata(struct lttng_consumer_local_data *ctx, - uint64_t session_id); +int consumer_stream_sync_metadata(struct lttng_consumer_local_data *ctx, uint64_t session_id); /* * Create the output files of a local stream. * * This must be called with the channel's and the stream's lock held. */ -int consumer_stream_create_output_files(struct lttng_consumer_stream *stream, - bool create_index); +int consumer_stream_create_output_files(struct lttng_consumer_stream *stream, bool create_index); /* * Rotate the output files of a local stream. This will change the @@ -123,8 +118,7 @@ bool consumer_stream_is_deleted(struct lttng_consumer_stream *stream); * * This must be called on initialization before any subbuffer is consumed. */ -int consumer_stream_enable_metadata_bucketization( - struct lttng_consumer_stream *stream); +int consumer_stream_enable_metadata_bucketization(struct lttng_consumer_stream *stream); /* * Set the version of a metadata stream (i.e. following a metadata @@ -133,16 +127,16 @@ int consumer_stream_enable_metadata_bucketization( * Changing the version of a metadata stream will cause any bucketized metadata * to be discarded and will mark the metadata stream for future `reset`. */ -void consumer_stream_metadata_set_version( - struct lttng_consumer_stream *stream, uint64_t new_version); +void consumer_stream_metadata_set_version(struct lttng_consumer_stream *stream, + uint64_t new_version); /* * Attempt to open a packet in a stream. * * This function must be called with the stream and channel locks held. */ -enum consumer_stream_open_packet_status consumer_stream_open_packet( - struct lttng_consumer_stream *stream); +enum consumer_stream_open_packet_status +consumer_stream_open_packet(struct lttng_consumer_stream *stream); /* * Flush a stream's buffer. @@ -153,7 +147,6 @@ enum consumer_stream_open_packet_status consumer_stream_open_packet( * * This function must be called with the stream and channel locks held. */ -int consumer_stream_flush_buffer(struct lttng_consumer_stream *stream, - bool producer_active); +int consumer_stream_flush_buffer(struct lttng_consumer_stream *stream, bool producer_active); #endif /* LTTNG_CONSUMER_STREAM_H */