This command allows the consumer daemon to reset the read position of
the metadata cache to 0. That way, it can be read again. This is used by
the session rotation feature to get a new copy of what was in the
metadata cache without regenerating it and re-sampling the offset from
epoch.
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_GET_METADATA_VERSION, version);
}
+int kernctl_metadata_cache_dump(int fd)
+{
+ return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_METADATA_CACHE_DUMP);
+}
/* Buffer operations */
int kernctl_buffer_flush(int fd);
int kernctl_buffer_flush_empty(int fd);
int kernctl_get_metadata_version(int fd, uint64_t *version);
+int kernctl_metadata_cache_dump(int fd);
/* index */
int kernctl_get_timestamp_begin(int fd, uint64_t *timestamp_begin);
#define RING_BUFFER_SNAPSHOT_SAMPLE_POSITIONS _IO(0xF6, 0x0E)
/* Flush the current sub-buffer, even if empty. */
#define RING_BUFFER_FLUSH_EMPTY _IO(0xF6, 0x0F)
+/*
+ * Reset the position of what has been consumed from the metadata cache to 0
+ * so it can be read again.
+ */
+#define RING_BUFFER_METADATA_CACHE_DUMP _IO(0xF6, 0x10)
/* returns the timestamp begin of the current sub-buffer */
#define LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN _IOR(0xF6, 0x20, uint64_t)