perf ftrace latency: Remove unnecessary "--" from --use-nsec option

Message ID 20230525212038.3535851-1-namhyung@kernel.org
State New
Headers
Series perf ftrace latency: Remove unnecessary "--" from --use-nsec option |

Commit Message

Namhyung Kim May 25, 2023, 9:20 p.m. UTC
  The option name should not have the dashes.  Current version shows four
dashes for the option.

  $ perf ftrace latency -h

   Usage: perf ftrace [<options>] [<command>]
      or: perf ftrace [<options>] -- [<command>] [<options>]
      or: perf ftrace {trace|latency} [<options>] [<command>]
      or: perf ftrace {trace|latency} [<options>] -- [<command>] [<options>]

      -b, --use-bpf         Use BPF to measure function latency
      -n, ----use-nsec      Use nano-second histogram
      -T, --trace-funcs <func>
                            Show latency of given function

Fixes: 84005bb61486 ("perf ftrace latency: Add -n/--use-nsec option")
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-ftrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Arnaldo Carvalho de Melo May 26, 2023, 6:19 p.m. UTC | #1
Em Thu, May 25, 2023 at 02:20:38PM -0700, Namhyung Kim escreveu:
> The option name should not have the dashes.  Current version shows four
> dashes for the option.
> 
>   $ perf ftrace latency -h
> 
>    Usage: perf ftrace [<options>] [<command>]
>       or: perf ftrace [<options>] -- [<command>] [<options>]
>       or: perf ftrace {trace|latency} [<options>] [<command>]
>       or: perf ftrace {trace|latency} [<options>] -- [<command>] [<options>]
> 
>       -b, --use-bpf         Use BPF to measure function latency
>       -n, ----use-nsec      Use nano-second histogram
>       -T, --trace-funcs <func>
>                             Show latency of given function

Thanks, applied.

- Arnaldo

 
> Fixes: 84005bb61486 ("perf ftrace latency: Add -n/--use-nsec option")
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
> ---
>  tools/perf/builtin-ftrace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
> index ad2a9ae041f6..ac2e6c75f912 100644
> --- a/tools/perf/builtin-ftrace.c
> +++ b/tools/perf/builtin-ftrace.c
> @@ -1177,7 +1177,7 @@ int cmd_ftrace(int argc, const char **argv)
>  	OPT_BOOLEAN('b', "use-bpf", &ftrace.target.use_bpf,
>  		    "Use BPF to measure function latency"),
>  #endif
> -	OPT_BOOLEAN('n', "--use-nsec", &ftrace.use_nsec,
> +	OPT_BOOLEAN('n', "use-nsec", &ftrace.use_nsec,
>  		    "Use nano-second histogram"),
>  	OPT_PARENT(common_options),
>  	};
> -- 
> 2.41.0.rc0.172.g3f132b7071-goog
>
  

Patch

diff --git a/tools/perf/builtin-ftrace.c b/tools/perf/builtin-ftrace.c
index ad2a9ae041f6..ac2e6c75f912 100644
--- a/tools/perf/builtin-ftrace.c
+++ b/tools/perf/builtin-ftrace.c
@@ -1177,7 +1177,7 @@  int cmd_ftrace(int argc, const char **argv)
 	OPT_BOOLEAN('b', "use-bpf", &ftrace.target.use_bpf,
 		    "Use BPF to measure function latency"),
 #endif
-	OPT_BOOLEAN('n', "--use-nsec", &ftrace.use_nsec,
+	OPT_BOOLEAN('n', "use-nsec", &ftrace.use_nsec,
 		    "Use nano-second histogram"),
 	OPT_PARENT(common_options),
 	};