diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh index 319ad724b97a..f224d79b89e6 100644 --- a/tools/perf/perf-completion.sh +++ b/tools/perf/perf-completion.sh @@ -202,6 +202,10 @@ __perf_main () $prev_skip_opts == @(record|stat|top) ]]; then local evts=$($cmd list --raw-dump pfm) __perfcomp "$evts" "$cur" + elif [[ $prev == @("-M"|"--metrics") && + $prev_skip_opts == @(stat) ]]; then + local metrics=$($cmd list --raw-dump metric metricgroup) + __perfcomp "$metrics" "$cur" else # List subcommands for perf commands if [[ $prev_skip_opts == @(kvm|kmem|mem|lock|sched|