diff options
-rw-r--r-- | tools/perf/builtin-help.c | 17 | ||||
-rw-r--r-- | tools/perf/perf-completion.sh | 2 |
2 files changed, 15 insertions, 4 deletions
diff --git a/tools/perf/builtin-help.c b/tools/perf/builtin-help.c index 25d20628212e..36486eade1ef 100644 --- a/tools/perf/builtin-help.c +++ b/tools/perf/builtin-help.c | |||
@@ -437,7 +437,18 @@ int cmd_help(int argc, const char **argv, const char *prefix __maybe_unused) | |||
437 | HELP_FORMAT_INFO), | 437 | HELP_FORMAT_INFO), |
438 | OPT_END(), | 438 | OPT_END(), |
439 | }; | 439 | }; |
440 | const char * const builtin_help_usage[] = { | 440 | const char * const builtin_help_subcommands[] = { |
441 | "buildid-cache", "buildid-list", "diff", "evlist", "help", "list", | ||
442 | "record", "report", "bench", "stat", "timechart", "top", "annotate", | ||
443 | "script", "sched", "kmem", "lock", "kvm", "test", "inject", "mem", "data", | ||
444 | #ifdef HAVE_LIBELF_SUPPORT | ||
445 | "probe", | ||
446 | #endif | ||
447 | #ifdef HAVE_LIBAUDIT_SUPPORT | ||
448 | "trace", | ||
449 | #endif | ||
450 | NULL }; | ||
451 | const char *builtin_help_usage[] = { | ||
441 | "perf help [--all] [--man|--web|--info] [command]", | 452 | "perf help [--all] [--man|--web|--info] [command]", |
442 | NULL | 453 | NULL |
443 | }; | 454 | }; |
@@ -448,8 +459,8 @@ int cmd_help(int argc, const char **argv, const char *prefix __maybe_unused) | |||
448 | 459 | ||
449 | perf_config(perf_help_config, &help_format); | 460 | perf_config(perf_help_config, &help_format); |
450 | 461 | ||
451 | argc = parse_options(argc, argv, builtin_help_options, | 462 | argc = parse_options_subcommand(argc, argv, builtin_help_options, |
452 | builtin_help_usage, 0); | 463 | builtin_help_subcommands, builtin_help_usage, 0); |
453 | 464 | ||
454 | if (show_all) { | 465 | if (show_all) { |
455 | printf("\n usage: %s\n\n", perf_usage_string); | 466 | printf("\n usage: %s\n\n", perf_usage_string); |
diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh index 535ff72babc7..dbca6a66f401 100644 --- a/tools/perf/perf-completion.sh +++ b/tools/perf/perf-completion.sh | |||
@@ -143,7 +143,7 @@ __perf_main () | |||
143 | __perfcomp_colon "$evts" "$cur" | 143 | __perfcomp_colon "$evts" "$cur" |
144 | else | 144 | else |
145 | # List subcommands for perf commands | 145 | # List subcommands for perf commands |
146 | if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched|data) ]]; then | 146 | if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched|data|help) ]]; then |
147 | subcmds=$($cmd $prev_skip_opts --list-cmds) | 147 | subcmds=$($cmd $prev_skip_opts --list-cmds) |
148 | __perfcomp_colon "$subcmds" "$cur" | 148 | __perfcomp_colon "$subcmds" "$cur" |
149 | fi | 149 | fi |