Skip to content

Prepare metrics for GNR on Cloud VMs #389

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

Merged
merged 3 commits into from
Jun 26, 2025
Merged

Prepare metrics for GNR on Cloud VMs #389

merged 3 commits into from
Jun 26, 2025

Conversation

harp-intel
Copy link
Contributor

No description provided.

@harp-intel harp-intel requested a review from Copilot June 25, 2025 21:48
Copy link
Contributor

@Copilot Copilot AI left a 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 adds support for GraniteRapids (gnr) on cloud VMs by providing new “nofixedtma” metric and event definitions and updating the loader logic to pick these files when fixed TMA counters aren’t available.

  • Introduce gnr_nofixedtma.json with 478 new metric expressions for GraniteRapids without fixed TMA.
  • Introduce gnr_nofixedtma.txt with 214 new event definitions for GraniteRapids.
  • Extend LoadMetricDefinitions and LoadEventGroups to recognize uarch == "gnr" and select the _nofixedtma variants.
  • Refactor PEBS event filtering in isCollectableEvent to loop on substrings rather than exact matches.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
cmd/metrics/resources/metrics/x86_64/GenuineIntel/gnr_nofixedtma.json New metrics definitions for GraniteRapids when fixed TMA is unsupported
cmd/metrics/resources/events/x86_64/GenuineIntel/gnr_nofixedtma.txt New event definitions for GraniteRapids when fixed TMA is unsupported
cmd/metrics/metric_defs.go Include gnr in the alternate‐metric selection for no‐fixed‐TMA path
cmd/metrics/event_defs.go Include gnr in the alternate‐event selection and refactor PEBS filtering
Comments suppressed due to low confidence (4)

cmd/metrics/resources/metrics/x86_64/GenuineIntel/gnr_nofixedtma.json:239

  • [nitpick] The metric name uses underscores and camel-case inconsistently compared to other metrics (e.g., "memory bandwidth read (MB/sec)"). Consider renaming to "IO bandwidth disk or network writes (MB/sec)" for consistency.
        "name": "IO_bandwidth_disk_or_network_writes (MB/sec)",

cmd/metrics/resources/metrics/x86_64/GenuineIntel/gnr_nofixedtma.json:243

  • [nitpick] Similarly, adjust this to "IO bandwidth disk or network reads (MB/sec)" to match the naming style of other metrics.
        "name": "IO_bandwidth_disk_or_network_reads (MB/sec)",

cmd/metrics/metric_defs.go:46

  • Add a unit test to verify that when uarch == "gnr" and SupportsFixedTMA is false, the loader correctly selects gnr_nofixedtma.json.
		if (uarch == "icx" || uarch == "spr" || uarch == "emr" || uarch == "gnr") && !metadata.SupportsFixedTMA {

cmd/metrics/event_defs.go:47

  • Add a unit test to ensure that LoadEventGroups picks gnr_nofixedtma.txt for uarch == "gnr" when fixed TMA is unsupported.
			alternate = "_nofixedtma"

@harp-intel harp-intel merged commit 6550483 into main Jun 26, 2025
4 checks passed
@harp-intel harp-intel deleted the gnrnotmacounter branch June 26, 2025 12:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant