[PATCH v4 1/4] perf metric: Event "Compat" value supports matching multiple identifiers

John Garry john.g.garry at oracle.com
Tue Jul 25 01:20:32 PDT 2023


On 23/07/2023 09:21, Jing Zhang wrote:
> The jevent "Compat" is used for uncore PMU alias or metric definitions.
> 
> The same PMU driver has different PMU identifiers due to different hardware
> versions and types, but they may have some common PMU event/metric. Since a
> Compat value can only match one identifier, when adding the same event
> alias and metric to PMUs with different identifiers, each identifier needs
> to be defined once, which is not streamlined enough.
> 
> So let "Compat" value supports matching multiple identifiers. For example,
> the Compat value {abcde;123*} can match the PMU identifier "abcde" and the
> the PMU identifier with the prefix "123", where "*" is a wildcard.
> Tokens in Unit field are delimited by ';' with no spaces.
> 
> Signed-off-by: Jing Zhang <renyu.zj at linux.alibaba.com>
> ---
>   tools/perf/util/metricgroup.c | 27 ++++++++++++++++++++++++++-

Why only support for metrics? Why not support for regular events 
aliases? I would have expected pmu_add_sys_aliases_iter_fn() to have 
been updated for this.

On the basis that we will support regular events aliases, we need perf 
tool self-test cases for this in tools/perf/test/pmu-events.c (I think 
that pmu-events.c would be the most appropriate file)

Thanks,
John




More information about the linux-arm-kernel mailing list