-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Move handle store and remaining crsts from BaseDomain
to AppDomain
#107208
Conversation
…global handle store
…s always uses the global handle store
Tagging subscribers to this area: @vitek-karas, @agocke, @VSadov |
CrstExplicitInit m_crstLoaderAllocatorReferences; | ||
|
||
IGCHandleStore* m_handleStore; | ||
|
||
// The pinned heap handle table. | ||
PinnedHeapHandleTable *m_pPinnedHeapHandleTable; |
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.
This is the only remaining thing on BaseDomain
. Currently, AppDomain
and SystemDomain
do actually create/use two separate instances. I don't think they need to though?
For SystemDomain
it is used via the global loader allocator:
runtime/src/coreclr/vm/loaderallocator.cpp
Line 845 in 9962a19
OBJECTREF* pRef = GetDomain()->AllocateObjRefPtrsInLargeTable(1); |
runtime/src/coreclr/vm/loaderallocator.cpp
Line 2385 in 9962a19
GetDomain()->AllocateObjRefPtrsInLargeTable(cSlots, pStaticsInfo, pMTToFillWithStaticBoxes, isClassInitedByUpdatingStaticPointer); |
For AppDomain
, it appears to just be for EnC:
runtime/src/coreclr/vm/encee.cpp
Line 1489 in 9962a19
*pOR = pDomain->AllocateStaticFieldObjRefPtrs(1); |
runtime/src/coreclr/vm/encee.cpp
Line 1497 in 9962a19
*pOR = pDomain->AllocateStaticFieldObjRefPtrs(1); |
dotnet#107208) - The handle store was always the global handle store - Make all the `Create*Handle` functions go through the `AppDomain` - `m_crstLoaderAllocatorReferences` is only used for collectible loader allocators - so only assembly loader allocators (which correspond to `AppDomain`), not the global loader allocator (which corresponds to `SystemDomain`) - Remove unnecessary `BaseDomain` on `PinnedHeapHandleTable`
dotnet#107208) - The handle store was always the global handle store - Make all the `Create*Handle` functions go through the `AppDomain` - `m_crstLoaderAllocatorReferences` is only used for collectible loader allocators - so only assembly loader allocators (which correspond to `AppDomain`), not the global loader allocator (which corresponds to `SystemDomain`) - Remove unnecessary `BaseDomain` on `PinnedHeapHandleTable`
dotnet#107208) - The handle store was always the global handle store - Make all the `Create*Handle` functions go through the `AppDomain` - `m_crstLoaderAllocatorReferences` is only used for collectible loader allocators - so only assembly loader allocators (which correspond to `AppDomain`), not the global loader allocator (which corresponds to `SystemDomain`) - Remove unnecessary `BaseDomain` on `PinnedHeapHandleTable`
Create*Handle
functions go through theAppDomain
m_crstLoaderAllocatorReferences
is only used for collectible loader allocators - so only assembly loader allocators (which correspond toAppDomain
), not the global loader allocator (which corresponds toSystemDomain
)BaseDomain
onPinnedHeapHandleTable
cc @jkotas @AaronRobinsonMSFT