Skip to content

Conversation

max-charlamb
Copy link
Member

No description provided.

Copy link
Contributor

Tagging subscribers to this area: @steveisok, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@max-charlamb max-charlamb changed the title [cDAC] implement GetGCHeapDetails [cDAC] implement GetGCHeapDetails and GetGCHeapStaticData Aug 27, 2025
@max-charlamb max-charlamb marked this pull request as ready for review August 28, 2025 00:54
Copy link
Contributor

@Copilot 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 implements two new cDAC methods for retrieving GC heap details: GetGCHeapDetails for server mode GC and GetGCHeapStaticData for workstation mode GC. The implementation replaces placeholder methods with full functionality that extracts comprehensive GC heap information including generation tables, finalization data, and various heap-specific pointers.

Key changes:

  • Adds complete implementations for ISOSDacInterface.GetGCHeapDetails and ISOSDacInterface.GetGCHeapStaticData
  • Introduces new data contracts and structures for accessing GC heap data from both workstation and server GC configurations
  • Extends the GC contract with new APIs for retrieving heap bounds, GC state, and detailed heap data

Reviewed Changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
SOSDacImpl.cs Implements GetGCHeapDetails and GetGCHeapStaticData with comprehensive GC heap data extraction and debug validation
ISOSDacInterface.cs Adds GCConstants, DacpGenerationData, and DacpGcHeapDetails structures with updated method signatures
Generation.cs New data contract for accessing GC generation information including allocation context and segment data
GCHeap.cs New data contract for server GC heap access with comprehensive heap field mapping
CFinalize.cs New data contract for accessing finalization queue fill pointers
GC_1.cs Extends GC contract with heap data retrieval methods for both workstation and server modes
Constants.cs Adds global pointer constants for GC heap field access
DataType.cs Registers new GC-related data types
IGC.cs Defines new heap data structures and extends IGC interface with heap access APIs
datadescriptor.inc (vm) Adds GC address bound globals
gcpriv.h Adds friend declaration for CFinalize cdac_data access
gc.cpp Fixes background GC build variant flag logic
datadescriptor.inc (gc) Comprehensive GC data structure definitions for heap, generation, and finalization data
datadescriptor.h Adds cdac_data specializations for gc_heap and CFinalize types
GC.md Updates documentation with new GC contract APIs and data structures

@max-charlamb max-charlamb requested a review from mangod9 September 2, 2025 18:10
@max-charlamb max-charlamb merged commit 44a6dd2 into dotnet:main Sep 3, 2025
101 checks passed
@max-charlamb max-charlamb deleted the cdac-gc-heap-details branch September 3, 2025 13:48
filipnavara pushed a commit to filipnavara/runtime that referenced this pull request Sep 5, 2025
)

* Implement GetGCHeapDetails
* Implement GetGCHeapStaticData
* Expand GC data descriptor
@github-actions github-actions bot locked and limited conversation to collaborators Oct 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants