Skip to content

Conversation

@max-charlamb
Copy link
Member

Change the datadescriptor infrastructure to allow easily creating multiple descriptors. Used in #118050

Copilot AI review requested due to automatic review settings August 6, 2025 15:54
Copy link
Contributor

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 pull request refactors the data descriptor infrastructure to enable creating multiple descriptors, moving from a monolithic approach to a reusable framework. The refactoring extracts common functionality into shared components and introduces a CMake function for generating descriptors.

  • Extracts shared data descriptor code into a separate directory for reuse
  • Introduces a CMake function generate_data_descriptors to streamline descriptor creation
  • Replaces hardcoded patterns with configurable contract names and pointer data names
  • Adds comprehensive documentation for the refactored infrastructure

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/coreclr/debug/runtimeinfo/datadescriptor.inc Removes wrapper macros and comments, keeping only the actual data definitions
src/coreclr/debug/runtimeinfo/datadescriptor.h New header containing all necessary includes for data descriptors
src/coreclr/debug/runtimeinfo/CMakeLists.txt Refactored to use the new generate_data_descriptors function instead of inline logic
src/coreclr/debug/datadescriptor-shared/datadescriptorwrapper.inc New wrapper providing the macro definitions previously in datadescriptor.inc
src/coreclr/debug/datadescriptor-shared/datadescriptor.cpp Moved from runtime-specific location, now includes wrapper
src/coreclr/debug/datadescriptor-shared/contractpointerdata.cpp Refactored to use configurable names and support sub-descriptors
src/coreclr/debug/datadescriptor-shared/contractdescriptorstub.c Updated to use configurable contract and pointer data names
src/coreclr/debug/datadescriptor-shared/contractconfiguration.h.in Template for contract configuration parameters
src/coreclr/debug/datadescriptor-shared/contract-descriptor.c.in Updated template to use configurable names and conditional exports
src/coreclr/debug/datadescriptor-shared/README.md Comprehensive documentation for the refactored infrastructure
src/coreclr/clrdatadescriptors.cmake New CMake function implementing the two-phase build process
src/coreclr/CMakeLists.txt Includes the new data descriptors CMake module

@dotnet-policy-service
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 force-pushed the datadescriptor-refactor branch from d58fdba to 8a6a118 Compare August 6, 2025 18:50
@max-charlamb max-charlamb merged commit 5371f13 into dotnet:main Aug 7, 2025
93 of 95 checks passed
@max-charlamb max-charlamb deleted the datadescriptor-refactor branch August 7, 2025 13:56
@github-actions github-actions bot locked and limited conversation to collaborators Sep 7, 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