Skip to content

[cDAC] Remove vestigial IsPegged from HandleData - #130728

Merged
max-charlamb merged 2 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/cdac-remove-ispegged
Jul 15, 2026
Merged

max-charlamb merged 2 commits into
dotnet:mainfrom
max-charlamb:max-charlamb/cdac-remove-ispegged

Conversation

@max-charlamb

Copy link
Copy Markdown
Member

Summary

  • Remove the vestigial IsPegged value from the consumer-facing HandleData shape.
  • Keep the frozen SOSHandleData.IsPegged field and populate it with zero directly.
  • Preserve DEBUG parity checks by asserting that both cDAC and legacy DAC outputs remain zero.

This keeps the GC contract focused on values consumers can observe while preserving SOS output behavior.

Validation

  • dotnet build src\native\managed\cdac\cdac.slnx -c Debug -p:UseSharedCompilation=false /nr:false
  • dotnet test src\native\managed\cdac\tests\UnitTests\Microsoft.Diagnostics.DataContractReader.Tests.csproj -c Debug --no-build (2697 passed, 16 skipped)
  • Targeted FullyQualifiedName~GCTests run (24 passed)

Note

This PR was generated with the assistance of GitHub Copilot.

Co-authored-by: Copilot <[email protected]>
Copilot-Session: f2aa5dc4-0c99-43f0-af14-734143849c4a
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the cDAC GC contract surface by removing the (apparently unused) IsPegged member from the consumer-facing HandleData shape, while keeping the legacy SOS SOSHandleData.IsPegged field and explicitly forcing it to 0 for output parity.

Changes:

  • Remove IsPegged from HandleData in IGC and stop populating it in GC_1 handle enumeration.
  • Preserve SOSHandleData.IsPegged but always emit 0 in SOSDacImpl, and tighten DEBUG parity checks to assert both implementations are 0.
  • Update the GC contract specification doc to match the new handle construction logic.

Reviewed changes

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

File Description
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/SOSDacImpl.cs Always emits SOSHandleData.IsPegged = 0 and asserts pegging is always zero in DEBUG parity checks.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/GC/GC_1.cs Stops setting the removed HandleData.IsPegged member during handle enumeration.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IGC.cs Removes IsPegged from the public HandleData record struct signature.
docs/design/datacontracts/GC.md Updates the contract algorithm snippet to no longer set IsPegged.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

Co-authored-by: Copilot <[email protected]>

Copilot-Session: f2aa5dc4-0c99-43f0-af14-734143849c4a
Copilot AI review requested due to automatic review settings July 14, 2026 21:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread docs/design/datacontracts/GC.md Resolved
@max-charlamb
max-charlamb marked this pull request as ready for review July 15, 2026 00:56
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 5 pipeline(s).
10 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@max-charlamb
max-charlamb enabled auto-merge (squash) July 15, 2026 01:14
@max-charlamb
max-charlamb merged commit 1155368 into dotnet:main Jul 15, 2026
79 checks passed
@max-charlamb
max-charlamb deleted the max-charlamb/cdac-remove-ispegged branch July 15, 2026 19:21
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 16, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 16, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants