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)
committerJonathan Rajotte <jonathan.rajotte-julien@efficios.com>
Mon, 18 Feb 2019 19:25:02 +0000 (14:25 -0500)
Signed-off-by: Jonathan Rajotte <jonathan.rajotte-julien@efficios.com>
src/common/kernel-ctl/kernel-ctl.c
src/common/kernel-ctl/kernel-ctl.h
src/common/kernel-ctl/kernel-ioctl.h

index 047d40a34d80ea611ff940a78efdb26ebf9127bd..9c5ed7fd982321db33fb7252d8286622c1ce2769 100644 (file)
@@ -418,6 +418,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 841c31da0d4c17d0fe353e32b0b73c73e0e3d65b..45fd6d29b6816905fae5f4703430c63cf279b99a 100644 (file)
@@ -95,6 +95,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 e7ff50b24349e0f152856a30177f36b6cbebb8f3..139cb635fa47b2aeb7ff9df7c3d7119a3ea83a7a 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.038045 seconds and 5 git commands to generate.