This PR refactors the topdown service to allow it to be easily extended to support top-down calculations for processors besides Haswell/Broadwell. To do this, I've made the following changes:
Creates a new TopdownCalculator base class to represent calculations for different processors
Moves the existing calculations to a new HaswellTopdown class, which inherits from TopdownCalculator
Refactors IntelTopdown to offload all the computation and associated tracking to a pointer to a TopdownCalculator object
This PR also uses this new infrastructure to add support for Sapphire Rapids and Emerald Rapids CPUs. The calculations for these CPUs were obtained from Intel's perfmon repo, specifically the following file: https://github.com/intel/perfmon/blob/main/SPR/metrics/perf/sapphirerapids_metrics_perf.json. The support added by this PR only covers the first two levels of the top-down hierarchy. In the future, this could be expanded to cover as much of the 6 levels for Sapphire Rapids as desired.
This PR is still work-in-progress. The following tasks need to be completed before this is ready for review:
Add a CMake mechanism to specify an architecture (currently planning on supporting architecture names from archspec)
Use that mechanism to select (at build time) the correct TopdownCalculator child class to use in the topdown service
Examine if any changes need to be made to the topdown built-in option
This PR refactors the topdown service to allow it to be easily extended to support top-down calculations for processors besides Haswell/Broadwell. To do this, I've made the following changes:
TopdownCalculator
base class to represent calculations for different processorsHaswellTopdown
class, which inherits fromTopdownCalculator
IntelTopdown
to offload all the computation and associated tracking to a pointer to aTopdownCalculator
objectThis PR also uses this new infrastructure to add support for Sapphire Rapids and Emerald Rapids CPUs. The calculations for these CPUs were obtained from Intel's perfmon repo, specifically the following file: https://github.com/intel/perfmon/blob/main/SPR/metrics/perf/sapphirerapids_metrics_perf.json. The support added by this PR only covers the first two levels of the top-down hierarchy. In the future, this could be expanded to cover as much of the 6 levels for Sapphire Rapids as desired.
This PR is still work-in-progress. The following tasks need to be completed before this is ready for review:
TopdownCalculator
child class to use in the topdown servicetopdown
built-in option