[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230810214952.2934029-1-irogers@google.com>
Date: Thu, 10 Aug 2023 14:49:49 -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>,
Kan Liang <kan.liang@...ux.intel.com>,
Ravi Bangoria <ravi.bangoria@....com>,
Kajol Jain <kjain@...ux.ibm.com>,
John Garry <john.g.garry@...cle.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH v2 0/3] perf list: Remove duplicate PMUs
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@...cle.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
Powered by blists - more mailing lists