Re: [PATCH v6 1/7] perf pmu: "Compat" supports matching multiple identifiers

From: John Garry
Date: Mon Aug 07 2023 - 05:20:23 EST


On 07/08/2023 08:51, 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.
Since a Compat value can only match one identifier, when adding the
same event alias to PMUs with different identifiers, each identifier
needs to be defined once, which is not streamlined enough.

So let "Compat" supports matching multiple identifiers for uncore PMU
alias. For example, the Compat value {43401;436*} can match the PMU
identifier "43401", that is, CMN600_r0p0, and the PMU identifier with
the prefix "436", that is, all CMN650, where "*" is a wildcard.
Tokens in Unit field are delimited by ';' with no spaces.

Signed-off-by: Jing Zhang<renyu.zj@xxxxxxxxxxxxxxxxx>
---

Reviewed-by: John Garry <john.g.garry@xxxxxxxxxx>