Currently we have hard limit on how many core PMU events Kernel Driver can count (and multiplex). In some situations number of core events can be insufficient.
[FutureDev] Arm Telemetry Solution metrics and other methodologies keep evolving we would need to be able to handle more events. In theory CPUs can have up to 31 GPCs (General Purpose Counters).
Number of events is specified with wperf padding algorithm, see ….. and with CLI (using -e).
We do not need to change padding algorithm. But MAX_MANAGED_CORE_EVENTS may impact this algorithm.
See DeviceAsyncIoControl API in wperf to see how we send IOCTRL to the driver and tract the flow from there. Use logs from https://linaro.atlassian.net/browse/WPERF-968to reason about flow of the IOCTRLs.
Definition of done
High level: Replace all fixed data structures which use MAX_MANAGED_CORE_EVENTS with dynamic allocation.
We can keep static max core event support value but we can increase it to e.g. 512. So:
MAX_MANAGED_CORE_EVENTS would be 512 and new value of
“max core events per IOCTRL transfer” will be used to slice:
total number of events defined with -e into separate IOCTRL packets what are sent to the driver from the wperf app.
Currently we have hard limit on how many core PMU events Kernel Driver can count (and multiplex). In some situations number of core events can be insufficient.
[FutureDev] Arm Telemetry Solution metrics and other methodologies keep evolving we would need to be able to handle more events. In theory CPUs can have up to 31 GPCs (General Purpose Counters).
Number of events is specified with wperf padding algorithm, see ….. and with CLI (using -e).
Background
Currently we allocate up to MAX_MANAGED_CORE_EVENTS for user events, see https://gitlab.com/Linaro/WindowsPerf/windowsperf/-/blob/main/wperf-common/macros.h?ref_type=heads#L46:
This is not as flexible solution and can be changed so that we can dynamically allocate number of events.
Notes:
Definition of done
PMU_CTL_ASSIGN_EVENTS
IOCTRL message.void pmu_device::events_assign(uint32_t core_idx, std::map<enum evt_class, std::vector<struct evt_noted>> events, bool include_kernel)
function.PMU_CTL_READ_COUNTING
IOCTRL message.void pmu_device::core_events_read()
function.