A few points to make on this:We have same named metrics for heterogeneous CPU PMUs:
- Currently we don't have any same-named metrics like this, so not much
use in supporting it in the code (yet).
https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/alderlake/adl-metrics.json?h=perf-tools-next*n304__;Iw!!ACWV5N9M2RV99hQ!MyvM7oyC6FgOVgDn2-Ot_TJNh4TF_VM9SlIVwv2AOTkJGdmDJ2NYf5WXh-yLcG1dRxLKdXWZVTzsoOo5yDk$ cpu_atom
https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/perf/perf-tools-next.git/tree/tools/perf/pmu-events/arch/x86/alderlake/adl-metrics.json?h=perf-tools-next*n1125__;Iw!!ACWV5N9M2RV99hQ!MyvM7oyC6FgOVgDn2-Ot_TJNh4TF_VM9SlIVwv2AOTkJGdmDJ2NYf5WXh-yLcG1dRxLKdXWZVTzsL1dVM3Q$ cpu_core
- Even if we had some same-named metrics, I am not sure if it even worksSo I was thinking IPC was a generic concept that would apply to a
properly. Do we have any uncore PMU metrics which have same name as CPU
metrics?
co-processor on a network card, a GPU, etc.
- Further to the previous point, do we really want same-named metricsAt the moment if you request an event without a PMU, say instructions
for different PMUs in the future? I think event / metric names need to
be chosen carefully to avoid clash for other PMUs or keywords. For your
example, if I did ask for IPC metric, I'd like to be able to just know
I'm getting IPC metric for CPUs or some other PMUs, but not both.
retired, we will attempt to open the event on every PMU - legacy
events (PERF_TYPE_HARDWARE, PERF_TYPE_HW_CACHE) only try the core
PMUs. It would seem consistent if metrics tried to open on every PMU
like most events.