* [PATCH] libtracefs: Update trace_buffer_meta
@ 2024-01-23 11:12 Vincent Donnefort
2024-01-23 18:06 ` Steven Rostedt
0 siblings, 1 reply; 2+ messages in thread
From: Vincent Donnefort @ 2024-01-23 11:12 UTC (permalink / raw)
To: linux-trace-devel, rostedt; +Cc: Vincent Donnefort
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>
diff --git a/src/tracefs-mmap.c b/src/tracefs-mmap.c
index 499233a..d3af453 100644
--- a/src/tracefs-mmap.c
+++ b/src/tracefs-mmap.c
@@ -10,25 +10,24 @@
#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 entries;
+ __u64 overrun;
+ __u64 read;
- __u32 meta_page_size; /* Size of the meta-page */
- __u32 meta_struct_len; /* Len of this struct */
+ __u64 subbufs_touched;
+ __u64 subbufs_lost;
};
#define TRACE_MMAP_IOCTL_GET_READER _IO('T', 0x1)
base-commit: 73ac9c192d058712993f9941927c924f2e206168
--
2.43.0.429.g432eaa2c6b-goog
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] libtracefs: Update trace_buffer_meta
2024-01-23 11:12 [PATCH] libtracefs: Update trace_buffer_meta Vincent Donnefort
@ 2024-01-23 18:06 ` Steven Rostedt
0 siblings, 0 replies; 2+ messages in thread
From: Steven Rostedt @ 2024-01-23 18:06 UTC (permalink / raw)
To: Vincent Donnefort; +Cc: linux-trace-devel
On Tue, 23 Jan 2024 11:12:42 +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.
>
> Signed-off-by: Vincent Donnefort <vdonnefort@google.com>
>
> diff --git a/src/tracefs-mmap.c b/src/tracefs-mmap.c
> index 499233a..d3af453 100644
> --- a/src/tracefs-mmap.c
> +++ b/src/tracefs-mmap.c
> @@ -10,25 +10,24 @@
> #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 entries;
> + __u64 overrun;
> + __u64 read;
>
> - __u32 meta_page_size; /* Size of the meta-page */
> - __u32 meta_struct_len; /* Len of this struct */
> + __u64 subbufs_touched;
> + __u64 subbufs_lost;
> };
>
> #define TRACE_MMAP_IOCTL_GET_READER _IO('T', 0x1)
>
> base-commit: 73ac9c192d058712993f9941927c924f2e206168
I'll hold off applying this until we have the kernel side locked down.
As I'm expecting there to be more versions of this patch.
Thanks,
-- Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-01-23 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-23 11:12 [PATCH] libtracefs: Update trace_buffer_meta Vincent Donnefort
2024-01-23 18:06 ` Steven Rostedt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).