[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230905181554.3202873-3-irogers@google.com>
Date: Tue, 5 Sep 2023 11:15:54 -0700
From: Ian Rogers <irogers@...gle.com>
To: Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
Stephane Eranian <eranian@...gle.com>
Subject: [PATCH v1 3/3] perf completion: Support completion of metrics/metricgroups
Allow metrics to expand for -M or --metrics options.
Signed-off-by: Ian Rogers <irogers@...gle.com>
---
tools/perf/perf-completion.sh | 4 ++++
1 file changed, 4 insertions(+)
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|
--
2.42.0.283.g2d96d420d3-goog
Powered by blists - more mailing lists