Tiny Patch Gets AMD Per-Core Energy Monitoring For Linux's Perf

AMD's Linux perf integration around the power reporting for their processors has mistakenly left out per-core energy monitoring support. With just reworking two lines of code, that power consumption information on a per-core basis will now be exposed to perf.
As with the other CPU power reporting, for security reasons it's limited to root/superviser mode perf execution.
This patch gets the per-core RAPL reporting working under perf with modern AMD Ryzen/EPYC processors.
8 Comments