Re: [PATCH 2/2] perf test: Improve pmu event metric testing
From: John Garry
Date: Thu May 14 2020 - 05:00:09 EST
On 13/05/2020 17:10, Ian Rogers wrote:
Out of interest, if we could move the validation of metrics to jevents,
how much functionality would we still have here?
If we add checking to jevents then the MetricExpr would be known to be
valid, however, the events (aka ids) within the expression could be
invalid.
So I think that has some value. I mean, just to detect syntax errors,
like those remedied in "perf metrics: fix parse errors in power8 metrics".
I'm not sure we could realistically check the events at
jevents (build) time as there is no guarantee that the machine we run
on is the same as the one we compile on.
But we could at least check that there are event aliases for that CPU,
right? (by examining the JSONs for that cpu). If the event alias does
not actually match on the target CPU, then that can't be helped.
Cheers,
John