]> git.ipfire.org Git - thirdparty/linux.git/commit
perf/x86: Print PMU counters bitmap in x86_pmu_show_pmu_cap()
authorDapeng Mi <dapeng1.mi@linux.intel.com>
Wed, 20 Aug 2025 02:30:32 +0000 (10:30 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Thu, 21 Aug 2025 18:09:28 +0000 (20:09 +0200)
commitf49e1be19542487921e82b29004908966cb99d7c
tree31559796026de75a7e2b9321b5f7842154246e76
parent2676dbf9f4fb7f6739d1207c0f1deaf63124642a
perf/x86: Print PMU counters bitmap in x86_pmu_show_pmu_cap()

Along with the introduction Perfmon v6, pmu counters could be
incontinuous, like fixed counters on CWF, only fixed counters 0-3 and
5-7 are supported, there is no fixed counter 4 on CWF. To accommodate
this change, archPerfmonExt CPUID (0x23) leaves are introduced to
enumerate the true-view of counters bitmap.

Current perf code already supports archPerfmonExt CPUID and uses
counters-bitmap to enumerate HW really supported counters, but
x86_pmu_show_pmu_cap() still only dumps the absolute counter number
instead of true-view bitmap, it's out-dated and may mislead readers.

So dump counters true-view bitmap in x86_pmu_show_pmu_cap() and
opportunistically change the dump sequence and words.

Signed-off-by: Dapeng Mi <dapeng1.mi@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Reviewed-by: Kan Liang <kan.liang@linux.intel.com>
Link: https://lore.kernel.org/r/20250820023032.17128-8-dapeng1.mi@linux.intel.com
arch/x86/events/core.c