All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/3] perf completion: Restrict completion of events to events
@ 2023-09-05 18:15 Ian Rogers
  2023-09-05 18:15 ` [PATCH v1 2/3] perf completion: Support completion of libpfm4 events Ian Rogers
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ian Rogers @ 2023-09-05 18:15 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, linux-perf-users, linux-kernel,
	Stephane Eranian

perf list will list libpfm4 events and metrics which aren't valid
options to the '-e' option. Restrict the events gathered so that
invalid ones aren't shown.

Before:
$ perf stat -e <tab><tab>
Display all 633 possibilities? (y or n)

After:
$ perf stat -e <tab><tab>
Display all 375 possibilities? (y or n)

Signed-off-by: Ian Rogers <irogers@google.com>
---
 tools/perf/perf-completion.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/perf-completion.sh b/tools/perf/perf-completion.sh
index 978249d7868c..40cfc30ad7ad 100644
--- a/tools/perf/perf-completion.sh
+++ b/tools/perf/perf-completion.sh
@@ -164,7 +164,7 @@ __perf_main ()
 		$prev_skip_opts == @(record|stat|top) ]]; then
 
 		local cur1=${COMP_WORDS[COMP_CWORD]}
-		local raw_evts=$($cmd list --raw-dump)
+		local raw_evts=$($cmd list --raw-dump hw sw cache tracepoint pmu sdt)
 		local arr s tmp result cpu_evts
 
 		# aarch64 doesn't have /sys/bus/event_source/devices/cpu/events
-- 
2.42.0.283.g2d96d420d3-goog


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-09-06 15:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-05 18:15 [PATCH v1 1/3] perf completion: Restrict completion of events to events Ian Rogers
2023-09-05 18:15 ` [PATCH v1 2/3] perf completion: Support completion of libpfm4 events Ian Rogers
2023-09-05 18:23   ` Namhyung Kim
2023-09-05 18:15 ` [PATCH v1 3/3] perf completion: Support completion of metrics/metricgroups Ian Rogers
2023-09-05 18:23   ` Namhyung Kim
2023-09-05 18:23 ` [PATCH v1 1/3] perf completion: Restrict completion of events to events Namhyung Kim
2023-09-06 15:18 ` Arnaldo Carvalho de Melo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.