linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] perf list: Remove duplicate PMUs
@ 2023-08-10 21:49 Ian Rogers
  2023-08-10 21:49 ` [PATCH v2 1/3] perf pmus: Sort pmus by name then suffix Ian Rogers
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Ian Rogers @ 2023-08-10 21:49 UTC (permalink / raw)
  To: Peter Zijlstra, Ingo Molnar, Arnaldo Carvalho de Melo,
	Mark Rutland, Alexander Shishkin, Jiri Olsa, Namhyung Kim,
	Ian Rogers, Adrian Hunter, Kan Liang, Ravi Bangoria, Kajol Jain,
	John Garry, linux-perf-users, linux-kernel

When there are multiple PMUs, differing by ordered suffixes, by
default only display one. This avoids repeated listing of events, in
particular when there are 10s of uncore PMUs. If "-v" is passed to
"perf list" then still list all PMUs.

Listing fewer PMU/event combinations helps speed the all PMU event
tests.

Before:
```
$ perf list
...
  uncore_imc_free_running_0/data_read/               [Kernel PMU event]
  uncore_imc_free_running_0/data_total/              [Kernel PMU event]
  uncore_imc_free_running_0/data_write/              [Kernel PMU event]
  uncore_imc_free_running_1/data_read/               [Kernel PMU event]
  uncore_imc_free_running_1/data_total/              [Kernel PMU event]
  uncore_imc_free_running_1/data_write/              [Kernel PMU event]
```

After:
```
$ perf list
...
  uncore_imc_free_running/data_read/                 [Kernel PMU event]
  uncore_imc_free_running/data_total/                [Kernel PMU event]
  uncore_imc_free_running/data_write/                [Kernel PMU event]
...
$ perf list -v
...
  uncore_imc_free_running_0/data_read/               [Kernel PMU event]
  uncore_imc_free_running_0/data_total/              [Kernel PMU event]
  uncore_imc_free_running_0/data_write/              [Kernel PMU event]
  uncore_imc_free_running_1/data_read/               [Kernel PMU event]
  uncore_imc_free_running_1/data_total/              [Kernel PMU event]
  uncore_imc_free_running_1/data_write/              [Kernel PMU event]
...
```

The PMUs are sorted by name then suffix as a part of this change.

v2: List all PMUs when "-v" is passed as suggested by John Garry
    <john.g.garry@oracle.com>.

Ian Rogers (3):
  perf pmus: Sort pmus by name then suffix
  perf pmus: Add scan that ignores duplicates, use for perf list
  perf pmus: Don't print duplicate PMU suffix in list by default

 tools/perf/builtin-list.c      |   8 +++
 tools/perf/util/pmus.c         | 120 +++++++++++++++++++++++++++++++--
 tools/perf/util/print-events.h |   1 +
 3 files changed, 122 insertions(+), 7 deletions(-)

-- 
2.41.0.640.ga95def55d0-goog


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

end of thread, other threads:[~2023-08-15  8:59 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-10 21:49 [PATCH v2 0/3] perf list: Remove duplicate PMUs Ian Rogers
2023-08-10 21:49 ` [PATCH v2 1/3] perf pmus: Sort pmus by name then suffix Ian Rogers
2023-08-11 13:56   ` Arnaldo Carvalho de Melo
2023-08-11 15:19     ` Ian Rogers
2023-08-11 15:46       ` Arnaldo Carvalho de Melo
2023-08-11 13:59   ` John Garry
2023-08-11 15:15     ` Ian Rogers
2023-08-10 21:49 ` [PATCH v2 2/3] perf pmus: Add scan that ignores duplicates, use for perf list Ian Rogers
2023-08-11 15:51   ` John Garry
2023-08-14 15:57     ` Ian Rogers
2023-08-14 16:09       ` Ian Rogers
2023-08-15  8:56         ` John Garry
2023-08-10 21:49 ` [PATCH v2 3/3] perf pmus: Don't print duplicate PMU suffix in list by default Ian Rogers
2023-08-11 15:53   ` John Garry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).