From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx> [ Note, this depends on libtracefs 1.8 and can not be added until that's released. ] Show the sub-buffer size if the file system supports it and it is different than the architecture page size. Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx> --- tracecmd/trace-stat.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tracecmd/trace-stat.c b/tracecmd/trace-stat.c index 9a6e22254b48..1d95d9934b47 100644 --- a/tracecmd/trace-stat.c +++ b/tracecmd/trace-stat.c @@ -633,6 +633,8 @@ static void report_buffers(struct buffer_instance *instance) char *str; char *cont; char file[FILE_SIZE]; + int pagesize; + int bufsize; int cpu; str = tracefs_instance_file_read(instance->tracefs, "buffer_size_kb", NULL); @@ -678,6 +680,11 @@ static void report_buffers(struct buffer_instance *instance) printf("\nBuffer total size in kilobytes:\n"); printf(" %s\n", str); + pagesize = getpagesize(); + bufsize = tracefs_instance_get_subbuf_size(instance->tracefs); + if (bufsize > 0 && bufsize * 1024 != pagesize) + printf("\nSub-buffer size in kilobytes:\n %d\n", bufsize); + out: free(str); } -- 2.42.0