Skip to content

[cDAC] Prepare for dacdbi stackwalk - #128679

Merged
rcj1 merged 9 commits into
dotnet:mainfrom
rcj1:sw
May 29, 2026
Merged

rcj1 merged 9 commits into
dotnet:mainfrom
rcj1:sw

Conversation

@rcj1

@rcj1 rcj1 commented May 28, 2026 •

Copy link
Copy Markdown
Contributor

This PR attempts to prepare for the DacDbi stackwalk APIs by refactoring the stackwalking iterator to return all frames. Specifically, we want to surface from the cDAC API the native marker frames that the SosDac does not consume but the DacDbi stack walk will consume. We then filter at the consumer level which frames we want to see.

In addition, we fill out a couple branches of a StackWalk Request API.

@rcj1
rcj1 requested review from Copilot, max-charlamb and noahfalk May 28, 2026 04:28
@rcj1 rcj1 changed the title Prepare for dacdbi stackwalk [cDAC] Prepare for dacdbi stackwalk May 28, 2026
@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.

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 refactors cDAC stack walking to expose native marker states while preserving legacy SOSDAC-visible filtering for existing IXCLRDataStackWalk consumers.

Changes:

  • Adds StackWalkState to the stack walk contract and exposes GetState.
  • Splits native stack walk states into initial/native-marker/Frame states.
  • Updates legacy stack walking to skip newly surfaced native-only frames.
Show a summary per file
File Description
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Legacy/ClrDataStackWalk.cs Filters the expanded stack walk back to legacy-visible frame states.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/StackWalk_1.ExceptionHandling.cs Restricts funclet checks to managed frameless states.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/StackWalk/StackWalk_1.cs Adds native marker states to stack walk iteration and GC-reference filtering.
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Abstractions/Contracts/IStackWalk.cs Moves StackWalkState into the contract abstraction and adds GetState.
docs/design/datacontracts/StackWalk.md Documents the new stack walk state API.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

Comment thread docs/design/datacontracts/StackWalk.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 28, 2026 04:33

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.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 3

Comment thread docs/design/datacontracts/StackWalk.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings May 28, 2026 04:38

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.

Copilot's findings

  • Files reviewed: 5/5 changed files
  • Comments generated: 2

@rcj1
rcj1 removed request for max-charlamb and noahfalk May 28, 2026 13:46
@rcj1
rcj1 marked this pull request as draft May 28, 2026 13:46

@max-charlamb max-charlamb left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

looks good to me once tests pass

Comment thread docs/design/datacontracts/StackWalk.md
Comment thread docs/design/datacontracts/StackWalk.md Outdated
@rcj1
rcj1 marked this pull request as ready for review May 28, 2026 18:15
Copilot AI review requested due to automatic review settings May 28, 2026 18:15

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.

Copilot's findings

  • Files reviewed: 15/15 changed files
  • Comments generated: 3

Copilot AI review requested due to automatic review settings May 29, 2026 04:40

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.

Copilot's findings

  • Files reviewed: 15/15 changed files
  • Comments generated: 4

@rcj1
rcj1 merged commit 1910df9 into dotnet:main May 29, 2026
63 of 65 checks passed
@rcj1
rcj1 deleted the sw branch May 29, 2026 13:59
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview6 milestone May 30, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 30, 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