-
Notifications
You must be signed in to change notification settings - Fork 52
Introduce Loader interface to support alternative event and metric initialization methods #433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
… matching Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
…eplacements and removing unnecessary prefix handling Signed-off-by: Harper, Jason M <[email protected]>
…or better performance Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
…ndling for consistency Signed-off-by: Harper, Jason M <[email protected]>
… improving configuration handling Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
… matching Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
…g in new perfmon_util.go Signed-off-by: Harper, Jason M <[email protected]>
… perfmon_util Signed-off-by: Harper, Jason M <[email protected]>
…rom the metrics resource directory. This file contained various CPU performance metrics that are no longer needed or relevant. Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
Signed-off-by: Harper, Jason M <[email protected]>
…c calculations Signed-off-by: Harper, Jason M <[email protected]>
…rrors Signed-off-by: Harper, Jason M <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a Loader interface to support alternative event and metric initialization methods, transitioning from a monolithic legacy approach to a modular architecture that can accommodate different event/metric loading strategies.
- Refactors legacy event/metric loading approach under new Loader interface
- Introduces perfmon-based loader that dynamically creates perf event groups from Intel perfmon definitions
- Adds comprehensive perfmon configuration files for Intel CPU architectures (Sierra Forest, Sapphire Rapids, Ice Lake)
Reviewed Changes
Copilot reviewed 40 out of 68 changed files in this pull request and generated 42 comments.
File | Description |
---|---|
cmd/metrics/resources/perfmon/srf/srf.json | Adds perfmon configuration for Intel Xeon 6 processors with E-cores (Sierra Forest) |
cmd/metrics/resources/perfmon/spr/spr.json | Adds perfmon configuration for Intel 4th Generation Xeon processors (Sapphire Rapids) |
cmd/metrics/resources/perfmon/icx/icx.json | Adds perfmon configuration for Intel 3rd Generation Xeon processors (Ice Lake) |
The legacy (original) approach to loading events and metrics has been refactored under the new Loader interface and is found in loader_legacy.go.
A new approach that creates perf event groups dynamically at runtime from perfmon (https://github.com/intel/perfmon) event and metric definitions is in loader_perfmon*.go. This approach eliminates the need to manually create perf event groups found in the legacy approach.
The intent is for additional methods of loading events/metrics, e.g., for other architectures, to use the new Loader interface so as to avoid co-mingling the approaches in nested if/else code.