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

Ian Rogers posted 2 patches 1 year, 7 months ago
tools/perf/tests/pmu.c | 99 ++++++++++++++++++++++++++++++++++++++++++
tools/perf/util/pmu.c  | 33 ++++++++------
tools/perf/util/pmus.c | 67 ++++++++++++++++------------
tools/perf/util/pmus.h |  7 ++-
4 files changed, 164 insertions(+), 42 deletions(-)
[PATCH v6 0/2] perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu
Posted by Ian Rogers 1 year, 7 months ago
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.

v6. Add necessary fix in pmu.c to perf_pmu__match_ignoring_suffix that
    also needs to ignore hex suffixes.
v5. In pmus.h remove needless addition of #include list.h but add
    stddef.h for size_t.
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  | 33 ++++++++------
 tools/perf/util/pmus.c | 67 ++++++++++++++++------------
 tools/perf/util/pmus.h |  7 ++-
 4 files changed, 164 insertions(+), 42 deletions(-)

-- 
2.45.0.rc1.225.g2a3ae87e7f-goog
Re: [PATCH v6 0/2] perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu
Posted by Namhyung Kim 1 year, 6 months ago
On Tue, 14 May 2024 23:01:12 -0700, Ian Rogers wrote:
> 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.
> 
> v6. Add necessary fix in pmu.c to perf_pmu__match_ignoring_suffix that
>     also needs to ignore hex suffixes.
> v5. In pmus.h remove needless addition of #include list.h but add
>     stddef.h for size_t.
> 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.
> 
> [...]

Applied to perf-tools-next, thanks!

Best regards,
-- 
Namhyung Kim <namhyung@kernel.org>
Re: [PATCH v6 0/2] perf pmus: Sort/merge/aggregate PMUs like mrvl_ddr_pmu
Posted by Namhyung Kim 1 year, 6 months ago
On Tue, May 14, 2024 at 11:01 PM Ian Rogers <irogers@google.com> wrote:
>
> 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.
>
> v6. Add necessary fix in pmu.c to perf_pmu__match_ignoring_suffix that
>     also needs to ignore hex suffixes.
> v5. In pmus.h remove needless addition of #include list.h but add
>     stddef.h for size_t.
> 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

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

>
>  tools/perf/tests/pmu.c | 99 ++++++++++++++++++++++++++++++++++++++++++
>  tools/perf/util/pmu.c  | 33 ++++++++------
>  tools/perf/util/pmus.c | 67 ++++++++++++++++------------
>  tools/perf/util/pmus.h |  7 ++-
>  4 files changed, 164 insertions(+), 42 deletions(-)
>
> --
> 2.45.0.rc1.225.g2a3ae87e7f-goog
>