2 * Copyright (C) 2013 - Julien Desfossez <jdesfossez@efficios.com>
3 * David Goulet <dgoulet@efficios.com>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License, version 2 only,
7 * as published by the Free Software Foundation.
9 * This program is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
14 * You should have received a copy of the GNU General Public License along
15 * with this program; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef CONSUMER_METADATA_CACHE_H
20 #define CONSUMER_METADATA_CACHE_H
22 #include <common/consumer.h>
24 struct consumer_metadata_cache
{
26 uint64_t cache_alloc_size
;
28 * How many bytes from the cache were already sent to the ring buffer.
32 * How many bytes are written in the buffer (excluding the wholes).
34 uint64_t total_bytes_written
;
36 * The upper-limit of data written inside the buffer.
38 * With the total_bytes_written it allows us to keep track of when the
39 * cache contains contiguous metadata ready to be sent to the RB.
40 * The metadata cache updates must not overlap.
44 * Lock to update the metadata cache and push into the ring_buffer
45 * (ustctl_write_metadata_to_channel).
47 * This is nested INSIDE the consumer_data lock.
52 int consumer_metadata_cache_write(struct lttng_consumer_channel
*channel
,
53 unsigned int offset
, unsigned int len
, char *data
);
54 int consumer_metadata_cache_allocate(struct lttng_consumer_channel
*channel
);
55 void consumer_metadata_cache_destroy(struct lttng_consumer_channel
*channel
);
56 int consumer_metadata_cache_flushed(struct lttng_consumer_channel
*channel
,
59 #endif /* CONSUMER_METADATA_CACHE_H */
This page took 0.030025 seconds and 4 git commands to generate.