perf/arm-cmn: Refactor occupancy filter selector
authorRobin Murphy <robin.murphy@arm.com>
Mon, 18 Apr 2022 22:57:40 +0000 (23:57 +0100)
committerWill Deacon <will@kernel.org>
Fri, 6 May 2022 14:07:25 +0000 (15:07 +0100)
commit65adf71398f5af9a591dc1b7eccac123f992d97a
treeb206c3f06d2b17a1c431ac2656bc60ad61d51b46
parent8e504d93acb647c0db31ba13ba11b510bbab4174
perf/arm-cmn: Refactor occupancy filter selector

So far, DNs and HN-Fs have each had one event ralated to occupancy
trackers which are filtered by a separate field. CMN-700 raises the
stakes by introducing two more sets of HN-F events with corresponding
additional filter fields. Prepare for this by refactoring our filter
selection and tracking logic to account for multiple filter types
coexisting on the same node. This need not affect the uAPI, which can
just continue to encode any per-event filter setting in the "occupid"
config field, even if it's technically not the most accurate name for
some of them.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Tested-by: Ilkka Koskinen <ilkka@os.amperecomputing.com>
Link: https://lore.kernel.org/r/1aa47ba0455b144c416537f6b0e58dc93b467a00.1650320598.git.robin.murphy@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
drivers/perf/arm-cmn.c