-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Adding GetClrWatsonBuckets cDAC API #118754
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
Conversation
Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag |
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 GetClrWatsonBuckets
API in the cDAC (Contract-based Data Access Component) system, providing a modern alternative to the legacy DAC implementation. The implementation retrieves Watson bucket data from exception objects for crash reporting and debugging purposes.
Key changes:
- Adds Watson bucket retrieval functionality through Thread and Exception contracts
- Creates new data structures for Object and updates ExceptionInfo to support Watson bucket access
- Implements the complete API with proper error handling and legacy comparison in debug builds
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
SOSDacImpl.cs | Implements the main GetClrWatsonBuckets API with contract-based logic and debug validation |
Thread.cs | Adds UEWatsonBucketTrackerBuckets field to Thread data structure |
Object.cs | Creates new Object data class with MethodTable property for Watson bucket object access |
ExceptionInfo.cs | Adds ExceptionWatsonBucketTrackerBuckets field for exception-specific Watson buckets |
Thread_1.cs | Implements three new Thread contract methods for retrieving throwable objects and Watson buckets |
Exception_1.cs | Implements GetWatsonBucketsFromThrowable method to extract Watson buckets from exception objects |
IThread.cs | Adds interface definitions for the new Thread contract methods |
IException.cs | Adds interface definition for GetWatsonBucketsFromThrowable method |
threads.h | Defines UEWatsonBucketTrackerBuckets offset in Thread cdac_data structure |
exstatecommon.h | Adds friend declarations and includes for cdac_data access |
exinfo.h | Defines ExceptionWatsonBucketTrackerBuckets offset in ExInfo cdac_data structure |
datadescriptor.inc | Registers new fields in CDAC type system and fixes Object field name |
Thread.md | Documents the new Thread contract methods with implementation examples |
Exception.md | Documents the new Exception contract method with implementation example |
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
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.
Given this requires some specific size data, I'm wondering if it would make sense to put part of this in the exception or thread contract.
We could discuss more at the meeting tomorrow.
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
Sure, we can move this to the thread contract. |
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.
We should use the Object.GetArrayData() API rather than re-implementing it but otherwise looks good to me.
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/Object.cs
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Thread_1.cs
Outdated
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Thread_1.cs
Outdated
Show resolved
Hide resolved
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
…into GetClrWatsonBuckets
src/native/managed/cdac/mscordaccore_universal/Legacy/SOSDacImpl.cs
Outdated
Show resolved
Hide resolved
...ive/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Exception_1.cs
Outdated
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Contracts/Thread_1.cs
Outdated
Show resolved
Hide resolved
...native/managed/cdac/Microsoft.Diagnostics.DataContractReader.Contracts/Data/ExceptionInfo.cs
Outdated
Show resolved
Hide resolved
…into GetClrWatsonBuckets
No description provided.