[PATCH] tracing: fix incorrcet short option in usage text for --threads

Zhang Chujun posted 1 patch 1 month, 1 week ago
[PATCH] tracing: fix incorrcet short option in usage text for --threads
Posted by Zhang Chujun 1 month, 1 week ago
The help message incorrectly listed '-t' as the short option for
--threads, but the actual getopt_long configuration uses '-e'.
This mismatch can confuse users and lead to incorrect command-line
usage. This patch updates the usage string to correctly show:
	"-e, --threads NRTHR"
to match the implementation.

Note: checkpatch.pl reports a false-positive spelling warning on
'Run', which is intentional.

Signed-off-by: Zhang Chujun <zhangchujun@cmss.chinamobile.com>

diff --git a/tools/tracing/latency/latency-collector.c b/tools/tracing/latency/latency-collector.c
index cf263fe9deaf..ef97916e3873 100644
--- a/tools/tracing/latency/latency-collector.c
+++ b/tools/tracing/latency/latency-collector.c
@@ -1725,7 +1725,7 @@ static void show_usage(void)
 "-n, --notrace\t\tIf latency is detected, do not print out the content of\n"
 "\t\t\tthe trace file to standard output\n\n"
 
-"-t, --threads NRTHR\tRun NRTHR threads for printing. Default is %d.\n\n"
+"-e, --threads NRTHR\tRun NRTHR threads for printing. Default is %d.\n\n"
 
 "-r, --random\t\tArbitrarily sleep a certain amount of time, default\n"
 "\t\t\t%ld ms, before reading the trace file. The\n"
-- 
2.50.1.windows.1
Re: [PATCH] tracing: fix incorrcet short option in usage text for --threads
Posted by Steven Rostedt 1 month, 1 week ago
On Thu,  6 Nov 2025 11:10:40 +0800
Zhang Chujun <zhangchujun@cmss.chinamobile.com> wrote:

> The help message incorrectly listed '-t' as the short option for
> --threads, but the actual getopt_long configuration uses '-e'.
> This mismatch can confuse users and lead to incorrect command-line
> usage. This patch updates the usage string to correctly show:
> 	"-e, --threads NRTHR"
> to match the implementation.
> 
> Note: checkpatch.pl reports a false-positive spelling warning on
> 'Run', which is intentional.

I'll pull this manually, but you sent to the wrong mailing list. It
should go to linux-trace-kernel@vger.kernel.org and not
linux-trace-devel. That's for user space tools that do not live in the
kernel proper.

-- Steve


> 
> Signed-off-by: Zhang Chujun <zhangchujun@cmss.chinamobile.com>
> 
> diff --git a/tools/tracing/latency/latency-collector.c b/tools/tracing/latency/latency-collector.c
> index cf263fe9deaf..ef97916e3873 100644
> --- a/tools/tracing/latency/latency-collector.c
> +++ b/tools/tracing/latency/latency-collector.c
> @@ -1725,7 +1725,7 @@ static void show_usage(void)
>  "-n, --notrace\t\tIf latency is detected, do not print out the content of\n"
>  "\t\t\tthe trace file to standard output\n\n"
>  
> -"-t, --threads NRTHR\tRun NRTHR threads for printing. Default is %d.\n\n"
> +"-e, --threads NRTHR\tRun NRTHR threads for printing. Default is %d.\n\n"
>  
>  "-r, --random\t\tArbitrarily sleep a certain amount of time, default\n"
>  "\t\t\t%ld ms, before reading the trace file. The\n"