Refactors topdown service to support multiple types of calculations and adds support for Sapphire Rapids #576
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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