Repository navigation
Add support to DAC for reading tagged memory on tracked types - #54994
4 commits merged into
Conversation
|
Tagging subscribers to this area: @tommcdon Issue DetailsObjective-C interop was added to CoreCLR in dotnet/runtime#52146. The design document for this feature included support for new diagnostic features in the SOS tooling. This document attempts to capture those details. The following capability should be provided by SOS. All mentioned .NET types are contained within the The SOS: When examining an Once this work is completed the design document's Diagnostics section will be updated to reflect the commands.
|
noahfalk
left a comment
There was a problem hiding this comment.
LGTM aside from the already commented stuff. Thanks @AaronRobinsonMSFT !
Create helper function for tagged memory API querying.
|
Hello @AaronRobinsonMSFT! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Objective-C interop was added to CoreCLR in dotnet/runtime#52146. The design document for this feature included support for new diagnostic features in the SOS tooling. This document attempts to capture those details.
The following capability should be provided by SOS. All mentioned .NET types are contained within the
System.Runtime.InteropServices.ObjectiveCnamespace unless stated otherwise.The
ObjectiveCMarshal.CreateReferenceTrackingHandle()API allocates aGCHandleof typeHNDTYPE_REFCOUNTEDfor the passed inobjectinstance. This handle type should already be known to SOS as it is also used for COM interop. What is new to this usage is "tagged memory". The tagged memory is presently 2 pointer sizes worth (that is,sizeof(void*) * 2) but could expand in the future. This memory is stored on theInteropSyncBlockInfotype in them_taggedMemoryfield.SOS: When examining an
object(that is,!do) and/or anobject'sSyncBlock(that is,!SyncBlk) provide the address of the tagged memory and size.Once this work is completed the design document's Diagnostics section will be updated to reflect the commands.