X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fconsumer%2Fconsumer-metadata-cache.h;h=b207cc79c233df23fb926aec7382b83094700a0d;hp=303f5cd2a1aeb7d71968b74c7c13876a82b32992;hb=9eac98281fd4923ea52b94abffd0cf8cfa27588e;hpb=a25d34bcf9a0d22f6814976ddb7376b464bd3e17 diff --git a/src/common/consumer/consumer-metadata-cache.h b/src/common/consumer/consumer-metadata-cache.h index 303f5cd2a..b207cc79c 100644 --- a/src/common/consumer/consumer-metadata-cache.h +++ b/src/common/consumer/consumer-metadata-cache.h @@ -10,6 +10,7 @@ #define CONSUMER_METADATA_CACHE_H #include +#include enum consumer_metadata_cache_write_status { CONSUMER_METADATA_CACHE_WRITE_STATUS_ERROR = -1, @@ -33,20 +34,13 @@ enum consumer_metadata_cache_write_status { }; struct consumer_metadata_cache { - char *data; - uint64_t cache_alloc_size; - /* - * Current version of the metadata cache. - */ + /* Current version of the metadata cache. */ uint64_t version; /* - * The upper-limit of data written inside the buffer. - * - * With the total_bytes_written it allows us to keep track of when the - * cache contains contiguous metadata ready to be sent to the RB. + * Size is the upper-limit of data written inside the buffer. * All cached data is contiguous. */ - uint64_t max_offset; + struct lttng_dynamic_buffer contents; /* * Lock to update the metadata cache and push into the ring_buffer * (ustctl_write_metadata_to_channel).