On 15/08/2023 10:40, John Garry wrote:
On 11/08/2023 15:39, James Clark wrote:
N2 r0p3 doesn't require the workaround [1], so gating on (#slots - 5) no longer works because all N2s have 5 slots. Add a new expression builtin that allows calling strcmp_cpuid_str() and comparing CPUIDs in metric formulas.
In this case, the commented formula looks like this:
strcmp_cpuid_str(0x410fd493) # greater than or equal to N2 r0p3 | strcmp_cpuid_str(0x410fd490) ^ 1 # OR NOT any version of N2
[1]:https://urldefense.com/v3/__https://gitlab.arm.com/telemetry-solution/teleme... Signed-off-by: James Clarkjames.clark@arm.com
tools/perf/arch/arm64/util/pmu.c | 18 +----------------- .../arch/arm64/arm/neoverse-n2-v2/metrics.json | 8 ++++---- tools/perf/pmu-events/metric.py | 17 +++++++++++++++-- tools/perf/util/expr.c | 18 ++++++++++++++++++ tools/perf/util/expr.h | 1 + tools/perf/util/expr.l | 1 + tools/perf/util/expr.y | 8 +++++++- tools/perf/util/pmu.c | 17 +++++++++++++++++ tools/perf/util/pmu.h | 1 + 9 files changed, 65 insertions(+), 24 deletions(-)
This patch looks ok, but I think that it would be better to separate out the metrics.json change into a separate patch.
Yep I thought about doing that, I can change it in the next version.
Thanks, John