-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Implement cDAC TraverseLoaderHeap via Loader contract #125129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
04535d2
Initial plan
Copilot f5cfd10
Implement cDAC TraverseLoaderHeap API using GC contract
Copilot ae89c94
Address code review: add kind validation, debug validation block, and…
Copilot 80a6655
Move LoaderHeap APIs from GC contract to Loader contract
Copilot 6c76e30
Use offsetof() directly in datadescriptor.inc instead of cdac_data st…
Copilot c6ebd5a
Revert stray template<typename T> cdac_data forward declaration from …
Copilot 2073ae1
Add LoaderHeapKind enum and separate ExplicitControlLoaderHeap cDAC t…
Copilot a04f5c8
Fix build break: add cdac_data specialization and friend declaration …
Copilot 668fc1c
fix
rcj1 0b34106
simplify loader heap
rcj1 54a628c
Update docs/design/datacontracts/GC.md
rcj1 b15b9ce
moving debug helpers
rcj1 221ef85
comments
rcj1 f21396f
Revert "simplify loader heap"
rcj1 60e0be1
code review
rcj1 d8c4a3f
fix callconv
rcj1 805c47f
Merge branch 'main' into copilot/implement-cdac-api-traverse-loader-heap
rcj1 36f229e
incorporating refactor
rcj1 4f54031
nits
rcj1 5c557d9
validation
rcj1 dbaf075
Merge branch 'main' into copilot/implement-cdac-api-traverse-loader-heap
rcj1 3889a45
Merge branch 'main' into copilot/implement-cdac-api-traverse-loader-heap
rcj1 8c8e760
updating datadescriptor types
rcj1 5b0d234
Merge branch 'main' into copilot/implement-cdac-api-traverse-loader-heap
rcj1 dde9736
Update docs/design/datacontracts/Loader.md
rcj1 c1181d6
Update src/coreclr/inc/loaderheap.h
rcj1 eccd8b1
Update LoaderHeapTests to use new TypedView/Layout test infrastructure
Copilot 52d60d2
Remove duplicate GetGlobalAllocationContext section from GC.md
Copilot e3e63ec
Reorder pseudocode blocks in GC.md to match declarations order
Copilot 8195d2b
Update GC.md
rcj1 e75df12
Update GC.md
rcj1 3a81183
Update GC.md
rcj1 281aad6
Merge branch 'main' into copilot/implement-cdac-api-traverse-loader-heap
rcj1 56eee51
Update Loader.md to remove Webcil section details
rcj1 ecbab65
code review feedback
rcj1 2486f0d
fix test
rcj1 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
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
19 changes: 19 additions & 0 deletions
19
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/LoaderHeap.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace Microsoft.Diagnostics.DataContractReader.Data; | ||
|
|
||
| internal sealed class LoaderHeap : IData<LoaderHeap> | ||
| { | ||
| static LoaderHeap IData<LoaderHeap>.Create(Target target, TargetPointer address) | ||
| => new LoaderHeap(target, address); | ||
|
|
||
| public LoaderHeap(Target target, TargetPointer address) | ||
| { | ||
| Target.TypeInfo type = target.GetTypeInfo(DataType.LoaderHeap); | ||
|
|
||
| FirstBlock = target.ReadPointer(address + (ulong)type.Fields[nameof(FirstBlock)].Offset); | ||
| } | ||
|
|
||
| public TargetPointer FirstBlock { get; init; } | ||
| } |
23 changes: 23 additions & 0 deletions
23
...e/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/LoaderHeapBlock.cs
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // Licensed to the .NET Foundation under one or more agreements. | ||
| // The .NET Foundation licenses this file to you under the MIT license. | ||
|
|
||
| namespace Microsoft.Diagnostics.DataContractReader.Data; | ||
|
|
||
| internal sealed class LoaderHeapBlock : IData<LoaderHeapBlock> | ||
| { | ||
| static LoaderHeapBlock IData<LoaderHeapBlock>.Create(Target target, TargetPointer address) | ||
| => new LoaderHeapBlock(target, address); | ||
|
|
||
| public LoaderHeapBlock(Target target, TargetPointer address) | ||
| { | ||
| Target.TypeInfo type = target.GetTypeInfo(DataType.LoaderHeapBlock); | ||
|
|
||
| Next = target.ReadPointer(address + (ulong)type.Fields[nameof(Next)].Offset); | ||
| VirtualAddress = target.ReadPointer(address + (ulong)type.Fields[nameof(VirtualAddress)].Offset); | ||
| VirtualSize = target.ReadNUInt(address + (ulong)type.Fields[nameof(VirtualSize)].Offset); | ||
| } | ||
|
|
||
| public TargetPointer Next { get; init; } | ||
| public TargetPointer VirtualAddress { get; init; } | ||
| public TargetNUInt VirtualSize { get; init; } | ||
| } |
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.