History

ring-buffer: Add page statistics to the meta-page

Add two fields pages_touched and pages_lost to the ring-buffer meta-page. Those fields are useful to get the number of used pages in the ring-buffer.

Vincent Donnefort committed 8 months ago

Commit 7d776a31 parent 1f318b92 files · +6 −4Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/trace_mmap.h+4−4
@@ -17,8 +17,8 @@ · 16 unmodified lines
1717 * @entries: Number of entries in the ring-buffer.
1818 * @overrun: Number of entries lost in the ring-buffer.
1919 * @read: Number of entries that have been read.
20− * @Reserved1: Internal use only.
21− * @Reserved2: Internal use only.
20+ * @pages_lost: Number of pages overwritten by the writer.
21+ * @pages_touched: Number of pages written by the writer.
2222 */
2323 struct trace_buffer_meta {
2424 __u32 meta_page_size;
@@ -39,8 +39,8 @@ struct trace_buffer_meta { · 14 unmodified lines
3939 __u64 overrun;
4040 __u64 read;
4141
42− __u64 Reserved1;
43− __u64 Reserved2;
42+ __u64 pages_lost;
43+ __u64 pages_touched;
4444 };
4545
4646 #define TRACE_MMAP_IOCTL_GET_READER _IO('R', 0x20)