Skip to content

Conversation

@harp-intel
Copy link
Contributor

This pull request updates the logic in the MergeUncoreGroups function within cmd/metrics/loader_perfmon_group_uncore.go to improve how duplicate events are handled and to optimize the merging process of uncore groups. The main improvements are the elimination of duplicate events before merging and a more robust merging loop that continues until no further merges are possible.

Deduplication of events:

  • Added logic to scan all UncoreGroup instances and remove duplicate events from their GeneralPurposeCounters, ensuring each event appears only in one group. Debug logging is included to track removals.

Merging process improvements:

  • Changed the merging loop to repeatedly attempt merges until no more groups can be merged, ensuring a more thorough consolidation of groups. The loop now uses a merged flag to continue merging as long as changes are made.

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
…o misreport event values

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel requested a review from Copilot November 21, 2025 19:12
Copy link
Contributor

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 fixes incorrect uncore metric values by improving the group merging logic. The changes ensure duplicate events are properly handled and that groups are merged as thoroughly as possible through an iterative approach.

Key Changes:

  • Adds deduplication pass to remove duplicate events across uncore groups before merging
  • Implements iterative merging loop that continues until no more groups can be merged

@harp-intel harp-intel linked an issue Nov 21, 2025 that may be closed by this pull request
@harp-intel harp-intel merged commit 1f5215c into main Nov 22, 2025
5 checks passed
@harp-intel harp-intel deleted the chacount branch November 22, 2025 02:19
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.

uncore frequency metric is incorrect

2 participants