From: "Steven Rostedt (VMware)" <rostedt@xxxxxxxxxxx> trace-cmd stat takes some options (-B and -t, as well as -h), but the usage and the man pages do not display them. Also, since 'h' was not included in the getopt(), it failed to be called. Fix that. Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx> --- Documentation/trace-cmd/trace-cmd-stat.1.txt | 12 +++++++++++- tracecmd/trace-stat.c | 2 +- tracecmd/trace-usage.c | 4 +++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/trace-cmd/trace-cmd-stat.1.txt b/Documentation/trace-cmd/trace-cmd-stat.1.txt index e5fccce9..1be9e609 100644 --- a/Documentation/trace-cmd/trace-cmd-stat.1.txt +++ b/Documentation/trace-cmd/trace-cmd-stat.1.txt @@ -7,7 +7,7 @@ trace-cmd-stat - show the status of the tracing (ftrace) system SYNOPSIS -------- -*trace-cmd stat* +*trace-cmd stat* ['OPTIONS'] DESCRIPTION ----------- @@ -45,6 +45,16 @@ system. The status that it shows is: *Error log:* Dump the content of ftrace error_log file. +OPTIONS +------- +*-B* 'buffer-name':: + Display the status of a given buffer instance. May be specified more than once + to display the status of multiple instances. + +*-t*:: + If *-B* is also specified, show the status of the top level tracing directory + as well as the instance(s). + SEE ALSO -------- trace-cmd(1), trace-cmd-record(1), trace-cmd-report(1), trace-cmd-start(1), diff --git a/tracecmd/trace-stat.c b/tracecmd/trace-stat.c index 31127872..e640a9e5 100644 --- a/tracecmd/trace-stat.c +++ b/tracecmd/trace-stat.c @@ -875,7 +875,7 @@ void trace_stat (int argc, char **argv) init_top_instance(); for (;;) { - c = getopt(argc-1, argv+1, "tB:"); + c = getopt(argc-1, argv+1, "htB:"); if (c == -1) break; switch (c) { diff --git a/tracecmd/trace-usage.c b/tracecmd/trace-usage.c index 98247074..094c6397 100644 --- a/tracecmd/trace-usage.c +++ b/tracecmd/trace-usage.c @@ -258,7 +258,9 @@ static struct usage_help usage_help[] = { { "stat", "show the status of the running tracing (ftrace) system", - " %s stat" + " %s stat [-B buf][-t]" + " -B show the status of a instance buffer\n" + " -t show the top level status along with buffer specified by -B\n" }, { "split", -- 2.29.2