Skip to content

Partial revert of "Delete LOADEDMODULES cache", additional cleanup - #116374

Merged
jkotas merged 3 commits into
dotnet:mainfrom
jkotas:profiler-revert
Jun 7, 2025
Merged

jkotas merged 3 commits into
dotnet:mainfrom
jkotas:profiler-revert

Conversation

@jkotas

@jkotas jkotas commented Jun 6, 2025 •

Copy link
Copy Markdown
Member

Adding back implementation of IMetaDataImport::ResolveTypeRef to avoid breaking profilers. The break was detected by internal profiler tests.

Also deleted unnecessary IClassFactory implementation.

Copilot AI review requested due to automatic review settings June 6, 2025 13:40
@github-actions github-actions Bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jun 6, 2025

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 partially reverts the deletion of the LOADEDMODULES cache and reintroduces the implementation of IMetaDataImport::ResolveTypeRef to avoid breaking profiler tests. Key changes include:

  • Re-adding caching support via RegMeta::AddToCache and restoring ResolveTypeRef in regmeta_vm.cpp.
  • Removing obsolete COM class factory code and related functions.
  • Updating build scripts to include the new VM caching definitions and remove deprecated sources.

Reviewed Changes

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

Show a summary per file
File Description
src/coreclr/md/enc/mdinternalrw.cpp Added call to AddToCache to update cache after interface setup.
src/coreclr/md/compiler/regmeta_vm.cpp Restored AddToCache and ResolveTypeRef implementations.
src/coreclr/md/compiler/regmeta.cpp Removed old Release implementation and updated QueryInterface.
src/coreclr/md/compiler/disp.cpp Added calls to AddToCache in various scope creation routines.
Various CMakeLists.txt and header files Removed obsolete class factory code and added FEATURE_METADATA_IN_VM definition.
Comments suppressed due to low confidence (1)

src/coreclr/md/CMakeLists.txt:4

  • Ensure that the addition of FEATURE_METADATA_IN_VM is compatible with all dependent modules and that its behavior is clearly documented in related developer guides.
add_compile_definitions($<$<NOT:$<OR:$<BOOL:$<TARGET_PROPERTY:DAC_COMPONENT>>,$<BOOL:$<TARGET_PROPERTY:DBI_COMPONENT>>>>:FEATURE_METADATA_IN_VM>)

Comment thread src/coreclr/md/compiler/regmeta_vm.cpp Resolved
Comment thread src/coreclr/md/compiler/disp.cpp Resolved
@jkotas
jkotas requested a review from tommcdon June 6, 2025 13:42
@jkotas jkotas added area-VM-coreclr and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 6, 2025
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@tommcdon tommcdon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! The changes look good!

@jkotas
jkotas force-pushed the profiler-revert branch from 1a06e95 to 54b824c Compare June 7, 2025 15:19
@jkotas

jkotas commented Jun 7, 2025

Copy link
Copy Markdown
Member Author

/ba-g timeout

@jkotas
jkotas merged commit e9957dc into dotnet:main Jun 7, 2025
@jkotas
jkotas deleted the profiler-revert branch June 7, 2025 19:44
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 8, 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.

3 participants