Skip to content

[cDAC] Adding symbols and using heap dumps#126385

Merged
rcj1 merged 14 commits intodotnet:mainfrom
rcj1:metadata-fallback
Apr 28, 2026
Merged

[cDAC] Adding symbols and using heap dumps#126385
rcj1 merged 14 commits intodotnet:mainfrom
rcj1:metadata-fallback

Conversation

@rcj1
Copy link
Copy Markdown
Contributor

@rcj1 rcj1 commented Mar 31, 2026

For cDAC dump testing, we need metadata for our locally built System.Private.CoreLib for reading certain statics etc., as well as for debuggees for metadata tests. So that we can use heap dumps instead of full dumps, we add the symbol paths when we open the dump in ClrMD.

@rcj1 rcj1 added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Mar 31, 2026
Copilot AI review requested due to automatic review settings March 31, 2026 23:44
@rcj1 rcj1 marked this pull request as draft March 31, 2026 23:44
@rcj1 rcj1 changed the title [WIP] Adding symbols and using heap dumps [WIP] [cDAC] Adding symbols and using heap dumps Mar 31, 2026
Copy link
Copy Markdown
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 updates the cDAC DumpTests infrastructure to prefer heap dumps (instead of full dumps) and makes dump analysis more reliable by providing ClrMD with local symbol/module search paths (including a self-contained symbol layout for Helix runs).

Changes:

  • Switch DumpTests to default to heap dumps (removing per-test DumpType => "full" overrides) and update debuggee projects to generate heap dumps.
  • Add symbol/module path discovery in DumpTestBase and plumb these paths into ClrMdDumpHost.Open.
  • Update Helix dump-generation to copy System.Private.CoreLib.dll and debuggee DLLs into a symbols/ folder alongside dumps so analysis can resolve modules without the original testhost layout.

Reviewed changes

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

Show a summary per file
File Description
src/native/managed/cdac/tests/DumpTests/SyncBlockDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/StackWalkDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/RCWDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/RCWCleanupListDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/LoaderDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/IXCLRDataValueDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/IXCLRDataFrameDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/IXCLRDataAppDomainDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/ISOSDacInterface13Tests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/ExceptionHandlingInfoDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/EcmaMetadataDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs Passes additional symbol paths to ClrMD and adds logic to discover symbol/module directories (Helix symbols/ and local artifacts fallback).
src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs Extends dump opening to accept additional symbol paths and configures ClrMD symbol search paths.
src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj Copies CoreLib + debuggee DLLs into a symbols/ tree next to dumps to enable symbol/module resolution on Helix machines.
src/native/managed/cdac/tests/DumpTests/ComWrappersDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/CCWDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/AsyncContinuationDumpTests.cs Removes full-dump override so the test uses default heap dump behavior.
src/native/managed/cdac/tests/DumpTests/Debuggees/SyncBlock/SyncBlock.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/StackWalk/StackWalk.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/RCWCleanupList/RCWCleanupList.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/RCW/RCW.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/MultiModule/MultiModule.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/LocalVariables/LocalVariables.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/ExceptionHandlingInfo/ExceptionHandlingInfo.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/ComWrappers/ComWrappers.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/CCW/CCW.csproj Switches debuggee dump generation to heap dumps.
src/native/managed/cdac/tests/DumpTests/Debuggees/AsyncContinuation/AsyncContinuation.csproj Switches debuggee dump generation to heap dumps (and removes prior “full dump needed” comment).

Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs Outdated
@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 review requested due to automatic review settings March 31, 2026 23:55
Copy link
Copy Markdown
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

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

Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs Outdated
Comment thread src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs Outdated
Comment thread src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj Outdated
Comment thread src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj
Copilot AI review requested due to automatic review settings April 1, 2026 04:12
Copy link
Copy Markdown
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

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

Comment thread src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj Outdated
Copilot AI review requested due to automatic review settings April 1, 2026 17:32
Copy link
Copy Markdown
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

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

Comment thread src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs Outdated
Copilot AI review requested due to automatic review settings April 1, 2026 23:13
Copy link
Copy Markdown
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

Copilot reviewed 27 out of 27 changed files in this pull request and generated no new comments.

@rcj1 rcj1 force-pushed the metadata-fallback branch from 099d709 to d23c4a9 Compare April 2, 2026 00:52
Copilot AI review requested due to automatic review settings April 2, 2026 02:34
Copy link
Copy Markdown
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

Copilot reviewed 31 out of 31 changed files in this pull request and generated 8 comments.

Comment thread src/native/managed/cdac/tests/DumpTests/DumpTestBase.cs
Comment thread src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj
Comment thread src/native/managed/cdac/tests/DumpTests/Debuggees/CCW/CCW.csproj
Comment thread src/native/managed/cdac/tests/DumpTests/Debuggees/RCW/RCW.csproj
Comment thread src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj
@rcj1 rcj1 removed NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it labels Apr 24, 2026
@rcj1 rcj1 marked this pull request as ready for review April 24, 2026 16:43
Copilot AI review requested due to automatic review settings April 24, 2026 16:43
Copy link
Copy Markdown
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

Copilot reviewed 31 out of 31 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

src/native/managed/cdac/tests/DumpTests/README.md:49

  • The README still states that “Debuggees that need full memory content (e.g., metadata-heavy scenarios) override this to Full”, but this PR changes multiple previously-Full debuggees to Heap. Please update the wording to reflect the new approach (heap dumps + local module files) so readers aren’t misled about when Full is required.
The dump type is configured per-debuggee via the `DumpTypes` property in each debuggee's
`.csproj` (default: `Heap`, set in `Debuggees/Directory.Build.props`). Debuggees that
need full memory content (e.g., metadata-heavy scenarios) override this to `Full`.

Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs
Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs Outdated
Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs
Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs
@rcj1 rcj1 requested a review from hoyosjs April 24, 2026 16:52
@rcj1 rcj1 changed the title [WIP] [cDAC] Adding symbols and using heap dumps [cDAC] Adding symbols and using heap dumps Apr 27, 2026
Comment thread src/native/managed/cdac/tests/DumpTests/cdac-dump-helix.proj
Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs
Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs
Copilot AI review requested due to automatic review settings April 28, 2026 00:26
Copy link
Copy Markdown
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

Copilot reviewed 31 out of 31 changed files in this pull request and generated 3 comments.

Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs
Comment thread src/native/managed/cdac/tests/DumpTests/README.md
Copy link
Copy Markdown
Member

@hoyosjs hoyosjs left a comment

Choose a reason for hiding this comment

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

Sure - some stuff can get some cleanup. I also think this brings good wins for testing so we can clean up and improve as needed.

Copilot AI review requested due to automatic review settings April 28, 2026 01:48
Copy link
Copy Markdown
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

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

Comment thread src/native/managed/cdac/tests/DumpTests/ClrMdDumpHost.cs
@rcj1
Copy link
Copy Markdown
Contributor Author

rcj1 commented Apr 28, 2026

/ba-g android and iOS dead letter

@rcj1 rcj1 merged commit 3ac6e13 into dotnet:main Apr 28, 2026
106 of 117 checks passed
@rcj1 rcj1 deleted the metadata-fallback branch April 28, 2026 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants