-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Delete LOADEDMODULES cache #116126
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
Delete LOADEDMODULES cache #116126
Conversation
This cache is not used by the runtime and it is not compiled into debugger (mscordbi). It looks like a left-over from fusion.
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 pull request removes the LOADEDMODULES cache and all associated caching logic, as it is no longer used by the runtime or debugger. Key changes include:
- Eliminating calls to AddToCache across multiple modules and functions.
- Removing the LOADEDMODULES class and the regmeta_vm.cpp file.
- Updating RegMeta methods (e.g., Release and ResolveTypeRef) to simplify implementation by removing cache handling.
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/coreclr/md/enc/mdinternalrw.cpp | Removed AddToCache call as part of deprecating caching logic. |
src/coreclr/md/compiler/regmeta_vm.cpp | Deleted obsolete file containing LOADEDMODULES cache logic. |
src/coreclr/md/compiler/regmeta_import.cpp | Updated ResolveTypeRef to return E_NOTIMPL, deprecating cache use. |
src/coreclr/md/compiler/regmeta.h | Removed declarations for caching methods and members. |
src/coreclr/md/compiler/regmeta.cpp | Simplified Release implementation, removing cache-related checks. |
src/coreclr/md/compiler/mdutil.h | Removed LOADEDMODULES class and associated functions. |
src/coreclr/md/compiler/emit.cpp | Updated DefineSecurityAttributeSet to return E_NOTIMPL. |
src/coreclr/md/compiler/disp.cpp | Removed multiple AddToCache calls, eliminating cache lookup logic. |
src/coreclr/md/compiler/assemblymd.cpp | Removed unused code related to caching. |
src/coreclr/md/compiler/CMakeLists.txt | Removed regmeta_vm.cpp from the build, as it is no longer needed. |
Comments suppressed due to low confidence (3)
src/coreclr/md/compiler/disp.cpp:182
- The removal of the cached RegMeta lookup in the read-only path means that every open call creates a new instance; please confirm that this change does not adversely impact performance or memory usage.
if (IsOfReadOnly(dwOpenFlags) && IsOfReadWrite(dwOpenFlags)) { // Invalid combination of flags - ofReadOnly & ofWrite
src/coreclr/md/compiler/regmeta.cpp:524
- The updated Release method now simply deletes the instance when the reference count reaches zero. Please verify that all concurrent usage scenarios have been adjusted to account for the removal of cache-specific lifetime management.
ULONG RegMeta::Release() { ULONG cRef = InterlockedDecrement(&m_cRef);
src/coreclr/md/compiler/regmeta_import.cpp:831
- Since ResolveTypeRef now returns E_NOTIMPL, please ensure that clients calling this API have been updated to handle this deprecation appropriately.
return E_NOTIMPL;
Tagging subscribers to this area: @mangod9 |
The caching logic for |
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.
@jkotas Do you know what |
|
The only feature left was a free-threaded marshaller that should not be needed for the limited use of IMetadata interface by profilers.
This reverts commit 7a06f23.
This cache is not used by the runtime and it is not compiled into debugger (mscordbi). It looks like a left-over from fusion.