Message ID | 20240129143122.2149432-1-vdonnefort@google.com (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | [v2] libtracefs: Update trace_buffer_meta | expand |
On Mon, 29 Jan 2024 14:31:22 +0000 Vincent Donnefort <vdonnefort@google.com> wrote: > The current version for struct trace_buffer_meta is taken from a work in > progress Linux patch series. Update it. > > Since your code is now in linux-next, care to send an updated version of this patch? I'll still keep it disabled in the library until it gets released in a stable tag (v6.9). -- Steve
On Fri, Feb 23, 2024 at 04:39:15PM -0500, Steven Rostedt wrote: > On Mon, 29 Jan 2024 14:31:22 +0000 > Vincent Donnefort <vdonnefort@google.com> wrote: > > > The current version for struct trace_buffer_meta is taken from a work in > > progress Linux patch series. Update it. > > > > > > Since your code is now in linux-next, care to send an updated version of > this patch? Looking at the last version of trace_mmap.h the v2 looks already up-to-date. But I sent a v3 adding the comments. -- Vincent > > I'll still keep it disabled in the library until it gets released in a > stable tag (v6.9). > > -- Steve
diff --git a/src/tracefs-mmap.c b/src/tracefs-mmap.c index fac13df..17e6366 100644 --- a/src/tracefs-mmap.c +++ b/src/tracefs-mmap.c @@ -10,25 +10,26 @@ #include "tracefs-local.h" struct trace_buffer_meta { - unsigned long entries; - unsigned long overrun; - unsigned long read; + __u32 meta_page_size; + __u32 meta_struct_len; - unsigned long subbufs_touched; - unsigned long subbufs_lost; - unsigned long subbufs_read; + __u32 subbuf_size; + __u32 nr_subbufs; struct { - unsigned long lost_events; /* Events lost at the time of the reader swap */ - __u32 id; /* Reader subbuf ID from 0 to nr_subbufs - 1 */ - __u32 read; /* Number of bytes read on the reader subbuf */ + __u64 lost_events; + __u32 id; + __u32 read; } reader; - __u32 subbuf_size; /* Size of each subbuf including the header */ - __u32 nr_subbufs; /* Number of subbufs in the ring-buffer */ + __u64 flags; - __u32 meta_page_size; /* Size of the meta-page */ - __u32 meta_struct_len; /* Len of this struct */ + __u64 entries; + __u64 overrun; + __u64 read; + + __u64 Reserved1; + __u64 Reserved2; }; #define TRACE_MMAP_IOCTL_GET_READER _IO('T', 0x1)
The current version for struct trace_buffer_meta is taken from a work in progress Linux patch series. Update it. Signed-off-by: Vincent Donnefort <vdonnefort@google.com> base-commit: 73ac9c192d058712993f9941927c924f2e206168