perfmon: refactor perf metric support 66/34666/2
authorRay Kinsella <mdr@ashroe.eu>
Thu, 2 Dec 2021 08:06:01 +0000 (08:06 +0000)
committerDamjan Marion <dmarion@me.com>
Thu, 2 Dec 2021 15:02:39 +0000 (15:02 +0000)
commite893beab2713a7fa1b8d5e9567b7c004e625fec6
treeb8a2fac3a3fd8645c188279f989444982d9602f4
parentc30f3006bde0005962edf4cf84ca022b806b5ccf
perfmon: refactor perf metric support

Refactoring perf metric support to remove branching on bundle type in
the dispatch wrapper. This change includes caching the rdpmc index at
perfmon_start(), so that the mmap_page.index doesn't need to be looked
up each time. It also exclude the effects of mmap_page.index.

This patch prepares the path for bundles that support general, fixed and
metrics counters simulataneously.

Type: refactor

Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: I9c5b4917bd02fea960e546e8558452c4362eabc4
src/plugins/perfmon/dispatch_wrapper.c
src/plugins/perfmon/intel/bundle/topdown_metrics.c
src/plugins/perfmon/perfmon.c
src/plugins/perfmon/perfmon.h