kernel-ctl: Expose kernel clear buffer operation
authorJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Tue, 12 Feb 2019 15:57:18 +0000 (10:57 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 19 Dec 2019 22:19:25 +0000 (17:19 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Change-Id: I582b922f577635ca66e78680fdfedb523e6dcf67
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/kernel-ctl/kernel-ctl.c
src/common/kernel-ctl/kernel-ctl.h
src/common/kernel-ctl/kernel-ioctl.h

index 14d96b5778ba36a1d05c2c44608c4b36f3668955..5f25adf02dc269debabcbdad5d04729ec0d46eb3 100644 (file)
@@ -453,6 +453,11 @@ int kernctl_buffer_flush_empty(int fd)
        return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_FLUSH_EMPTY);
 }
 
+int kernctl_buffer_clear(int fd)
+{
+       return LTTNG_IOCTL_CHECK(fd, RING_BUFFER_CLEAR);
+}
+
 /* returns the version of the metadata. */
 int kernctl_get_metadata_version(int fd, uint64_t *version)
 {
index 053e7df6314fc1dfd7ba99e8822a5afaf5f5a33e..fcaca84fe3d43ae1a3ba3a49ec265e982c7f2efd 100644 (file)
@@ -97,6 +97,7 @@ int kernctl_put_subbuf(int fd);
 
 int kernctl_buffer_flush(int fd);
 int kernctl_buffer_flush_empty(int fd);
+int kernctl_buffer_clear(int fd);
 int kernctl_get_metadata_version(int fd, uint64_t *version);
 int kernctl_metadata_cache_dump(int fd);
 
index 8d39abbe38ec882a3c691e07172511a2ff204b27..f38f5dd671d3577c1de8d18d8a138c17fa07e04a 100644 (file)
@@ -64,6 +64,8 @@
  * so it can be read again.
  */
 #define RING_BUFFER_METADATA_CACHE_DUMP        _IO(0xF6, 0x10)
+/* Clear ring buffer content */
+#define RING_BUFFER_CLEAR                       _IO(0xF6, 0x11)
 
 /* returns the timestamp begin of the current sub-buffer */
 #define LTTNG_RING_BUFFER_GET_TIMESTAMP_BEGIN     _IOR(0xF6, 0x20, uint64_t)
This page took 0.026923 seconds and 4 git commands to generate.