fix(metrics): probe AMD L3 uncore and disable when unusable (fixes #660)#661
Merged
harp-intel merged 1 commit intomainfrom Mar 12, 2026
Merged
fix(metrics): probe AMD L3 uncore and disable when unusable (fixes #660)#661harp-intel merged 1 commit intomainfrom
harp-intel merged 1 commit intomainfrom
Conversation
On GCP AMD Turin instances, sysfs lists amd_l3 but perf cannot use the L3 PMU, causing 'no metrics collected' when uncore events are included. - Add AMD-only metadata script that runs perf stat with one L3 event. - When the probe fails (exit != 0 or stderr indicates L3 PMU unavailable), set SupportsUncore = false and remove l3/df from UncoreDeviceIDs so collection uses core-only events and still produces metrics. - In legacy loader isCollectableEvent, require SupportsUncore for all uncore-by-device events (not only name-prefix UNC), so AMD l3/df events are excluded when uncore is disabled. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
On GCP AMD Turin instances, sysfs lists
amd_l3but perf cannot use the L3 PMU, causing "no metrics collected" when uncore events are included (see #660).Changes:
perf statwith one L3 event.SupportsUncore = falseand removel3/dffromUncoreDeviceIDsso collection uses core-only events and still produces metrics.isCollectableEvent, requireSupportsUncorefor all uncore-by-device events (not only name-prefix UNC), so AMD l3/df events are excluded when uncore is disabled.Result: On GCP (and similar VMs) metrics are collected with core-only events; on bare-metal AMD Turin uncore remains enabled when the probe succeeds.
Made with Cursor