Skip to content

Refactor cpuid and metric table lookup code

Ian Rogers linux-arm-kernel linux-perf-users linux-riscv lkml stable 2 versions Applied

Status from this message: This series was applied to riscv/linux.git (fixes)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest8 patches 8 repliesApplied 8/8
  2. v17 patches 2 repliesSuperseded

Patches in v2 All 8 applied

#Subject and filesSizeRepliesApplied
1/8perf jevents: fix breakage when do perf stat on system metrictools/perf/pmu-events/empty-pmu-events.c tools/perf/pmu-events/jevents.py+2 -220 repliesApplied
2/8perf header: Move is_cpu_online to numa benchtools/perf/bench/numa.c tools/perf/util/header.c tools/perf/util/header.h+53 -520 repliesApplied
3/8perf header: Refactor get_cpuid to take a CPU for ARMtools/perf/arch/arm64/util/header.c tools/perf/arch/loongarch/util/header.c tools/perf/arch/powerpc/util/header.c +8 more+19 -140 repliesApplied
4/8perf arm64 header: Use cpu argument in get_cpuidtools/perf/arch/arm64/util/header.c tools/perf/util/header.h+31 -330 repliesApplied
5/8perf header: Avoid transitive PMU includestools/perf/tests/expr.c tools/perf/util/env.c tools/perf/util/probe-event.c+4 -00 repliesApplied
6/8perf header: Pass a perf_cpu rather than a PMU to get_cpuid_strtools/perf/arch/arm64/util/arm-spe.c tools/perf/arch/arm64/util/header.c tools/perf/arch/loongarch/util/header.c +12 more+57 -670 repliesApplied
7/8perf jevents: Add map_for_cputools/perf/pmu-events/empty-pmu-events.c tools/perf/pmu-events/jevents.py+26 -140 repliesApplied
8/8perf pmu: Move pmu_metrics_table__find and remove ARM overridetools/perf/arch/arm64/util/pmu.c tools/perf/pmu-events/empty-pmu-events.c tools/perf/pmu-events/jevents.py +3 more+9 -393 repliesApplied

Reviews trailers per patch

1 of 8 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIan RogersXu YangJames Clark
SeriesT-b R-b
1/8A-b
2/8
3/8
4/8
5/8
6/8
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v2 thread

Cover letter [PATCH v2 0/8] Refactor cpuid and metric table lookup code

Xu Yang <[email protected]> reported issues with the system metric lookup:
https://lore.kernel.org/linux-perf-users/[email protected]/
These patches remove a lot of the logic relating CPUIDs to PMUs so that the PMU isn't part of the question when finding a metric table. For time reasons, it doesn't go as far as allowing system metrics without a metric table as a metric table is needed for metrics to refer to other metrics, and the refactoring of that resolution is a hassle.

Ian Rogers (7):
perf header: Move is_cpu_online to numa bench
perf header: Refactor get_cpuid to take a CPU for ARM perf arm64 header: Use cpu argument in get_cpuid
perf header: Avoid transitive PMU includes
perf header: Pass a perf_cpu rather than a PMU to get_cpuid_str perf jevents: Add map_for_cpu
perf pmu: Move pmu_metrics_table__find and remove ARM override

Xu Yang (1):
perf jevents: fix breakage when do perf stat on system metric

 tools/perf/arch/arm64/util/arm-spe.c     | 14 +---
 tools/perf/arch/arm64/util/header.c      | 73 ++++++++++-----------
 tools/perf/arch/arm64/util/pmu.c         | 20 ------
 tools/perf/arch/loongarch/util/header.c  |  4 +-
 tools/perf/arch/powerpc/util/header.c    |  4 +-
 tools/perf/arch/riscv/util/header.c      |  4 +-
 tools/perf/arch/s390/util/header.c       |  6 +-
 tools/perf/arch/x86/util/auxtrace.c      |  3 +-
 tools/perf/arch/x86/util/header.c        |  5 +-
 tools/perf/bench/numa.c                  | 53 +++++++++++++++
 tools/perf/builtin-kvm.c                 |  4 +-
 tools/perf/pmu-events/empty-pmu-events.c | 39 ++++++-----
 tools/perf/pmu-events/jevents.py         | 39 ++++++-----
 tools/perf/pmu-events/pmu-events.h       |  2 +-
 tools/perf/tests/expr.c                  |  5 +-
 tools/perf/util/env.c                    |  4 +-
 tools/perf/util/expr.c                   |  6 +-
 tools/perf/util/header.c                 | 82 ++++++++----------------
 tools/perf/util/header.h                 | 23 +++----
 tools/perf/util/pmu.c                    | 25 --------
 tools/perf/util/pmu.h                    |  2 -
 tools/perf/util/probe-event.c            |  1 +
 22 files changed, 189 insertions(+), 229 deletions(-)
Signature · 1 line
2.47.0.199.ga7371fff76-goog