[PATCH v4 0/2] perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu

From: Ian Rogers
Date: Mon May 13 2024 - 20:14:24 EST


The mrvl_ddr_pmu is uncore and has a hexadecimal address
suffix. Current PMU sorting/merging code assumes uncore PMU names
start with uncore_ and have a decimal suffix. Add support for
hexadecimal suffixes and add tests.

v4. Workaround GCC build error by using unsigned types. Don't consider
short hex suffixes as suffixes (e.g. cpum_cf) and test this
behavior.
v3. Rebase and move tests from pmus.c to the existing pmu.c.

Ian Rogers (2):
perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu
perf tests: Add some pmu core functionality tests

tools/perf/tests/pmu.c | 99 ++++++++++++++++++++++++++++++++++++++++++
tools/perf/util/pmu.c | 17 ++++----
tools/perf/util/pmus.c | 67 ++++++++++++++++------------
tools/perf/util/pmus.h | 7 ++-
4 files changed, 152 insertions(+), 38 deletions(-)

--
2.45.0.118.g7fe29c98d7-goog