Description
Currently, on modern HW, where multiple PMU counters can be recorded for single run (example: Icaleake with 16 concurrent PMU counters, the code perf_counters.cc
hard codes a limit of 3 counters globally.
I'd like to use libpfm's internal API to detect at runtime the PMU that each requested counter is associated with,
and internally track how many counters are "consumed" from each PMU given the information retrieved from calling
pfm_get_pmu_info()
instead of the current hard-coded limit of 3 built into the code.
I opening this issue in preparation of providing a PR that would implement such logic, and wanted to see if this is
something that needs more discussion / blessing before submitting a PR.
I have already started some preliminary work on tracking the requested counters vs. the availability of each PMU.