-
Notifications
You must be signed in to change notification settings - Fork 4.9k
[cDAC] Implement ISOSDacImpl.GetAssemblyList #114800
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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 implements the ISOSDacImpl.GetAssemblyList API to support iterating assemblies within an AppDomain. Key changes include:
- Implementation of the GetAssemblyList method in SOSDacImpl.cs with appropriate argument checks, exception handling, and debug validation.
- Addition of new data types (e.g. LoaderAllocator, ArrayListBase, and related cdac_data specializations) and updates to the assembly and appdomain data models to support the new functionality.
- Updates to the ILoader interface and associated loaders in the DataContractReader.Contracts to enumerate assemblies based on various iteration flags.
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
src/native/managed/cdacreader/src/Legacy/SOSDacImpl.cs | Implements the GetAssemblyList API with error checks and debug validation against legacy implementations. |
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/LoaderAllocator.cs | Introduces LoaderAllocator data type for tracking loader allocations. |
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Assembly.cs | Extends the Assembly data type with new fields (Module, Error, NotifyFlags, Level) to support assembly status. |
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ArrayListBase.cs | Provides implementation for ArrayListBase and its block elements using modern collection initialization. |
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Data/AppDomain.cs | Adds DomainAssemblyList field for improved assembly enumeration in AppDomains. |
src/native/managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs | Updates ILoader contract with GetAssemblies and IsAssemblyLoaded methods. |
Other coreclr and datadescriptor files | Updates to cdac_data and constant definitions to support the new APIs. |
.../managed/cdacreader/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Loader_1.cs
Show resolved
Hide resolved
Tagging subscribers to this area: @tommcdon |
@@ -1913,9 +1916,10 @@ class SystemDomain final | |||
|
|||
InlineSString<100> m_SystemDirectory; | |||
|
|||
public: | |||
// Global domain that every one uses | |||
SPTR_DECL(SystemDomain, m_pSystemDomain); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if there is a better way to access this global in the datadescriptors. Ideally, I don't want to change its access modifier.
65a2ec4
to
74cc1a4
Compare
As part of work for #114336, the cDAC now supports iterating Assemblies in an AppDomain so this API falls out nicely.
It is also used as part of
!dumpdomain
and is relatively easy to test.