For Intel we do this by just having a different constant for eachThis may be a feasible idea. The value of slots comes from the register PMMIR_EL1, which I can read inMaybe during runtime we could create a pseudo metric/event for SLOT.
/sys/bus/event_source/device/armv8_pmuv3_*/caps/slots. But how do I replace the slots in MetricExpr with the
read slots values? Currently I understand that parameters in metricExpr only support events and constants.
architecture. It is fairly easy to add a new "literal", so you could
add a #slots in expr__get_literal:
https://urldefense.com/v3/__https://git.kernel.org/pub/scm/linux/kernel/git/acme/linux.git/tree/tools/perf/util/expr.c?h=perf*core*n407__;LyM!!ACWV5N9M2RV99hQ!IHcZFuFaLdQDQvVOnHVlbbME2S4aW8GohWUkydlejpi7ifFz61r7RutGXReRt0d88X_vDfkTySCiuD2PqOA$ Populating it would be the challenge 😄