[PATCH v4 5/6] perf vendor events arm64: Update stall_slot workaround for N2 r0p3

John Garry john.g.garry at oracle.com
Wed Aug 9 06:54:11 PDT 2023


On 09/08/2023 14:06, James Clark wrote:
>> "MetricExpr": "(op_retired / op_spec) * (1 - (stall_slot if
>> (cpuid_less_than(410fd493)) else (stall_slot - cpu_cycles)) / (#slots *
>> cpu_cycles))"
>>
>> I'm currently figuring out how cpuid_less_than() would be implemented
>> (I'm no great python wrangler), but it would be along the lines of what
>> Ian added for "has_event" in
>> https://urldefense.com/v3/__https://lore.kernel.org/linux-perf-users/20230623151016.4193660-1-irogers@google.com/__;!!ACWV5N9M2RV99hQ!PlOppEWtIj9jDW2Zlon0zRZVpzPTzPvm5Ho5NnRIN0vD78iFcEzMEAtsrW_MrRPiW84XhWpbhc3seQcmLu-BfQ$  
>>
>> Thanks,
>> John
> Yeah it looks like it could be done that way. Also, the way I added it,
> it doesn't have access to the PMU type, it just does a generic
> pmu__find_core_pmu() so won't work very well for heterogeneous systems.

I haven't been keeping a close eye on the hybrid PMU support, but AFAIK 
metrics for hybrid arm64 system, i.e. bL, aren't supported - maybe that 
has changed. The gating for bL support was in pmu__find_core_pmu() 
returning NULL for a hybrid system.

> 
> If we're going to do a deeper modification of the expression parser like
> with has_event() it might be possible to pass in the actual CPU ID that
> the metric is running on which would be better.
> 
> I'll have a look.

Thanks. I was playing with this yesterday, but I was making slow 
progress. I was essentially following the has_event example, but the 
argument type causes an issue, in that has_event expected an event name, 
while we want to pass a hex string.

If you could check this then that would be great.

Thanks,
John




More information about the linux-arm-kernel mailing list