Skip to content
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

Make normal statics simpler #99183

Merged
merged 103 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
103 commits
Select commit Hold shift + click to select a range
b57c72b
Phase 1 of modernize our static variable handling
davidwrighton Feb 28, 2024
e47278b
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Feb 28, 2024
34420e0
Followup commit
davidwrighton Feb 28, 2024
3cb0324
Fix merge conflict
davidwrighton Feb 28, 2024
37e2555
Tweak so R2R works for now. May need further adjustment.
davidwrighton Feb 29, 2024
78720e1
Enable using the dynamic and pinned helpers for jitted code. Should b…
davidwrighton Feb 29, 2024
c375996
Re-enable the helper expansions for statics
davidwrighton Mar 1, 2024
5ec61b2
Attempt to implement for X64 unix. We'll see if I guessed right
davidwrighton Mar 2, 2024
e88cda8
Windows Arm64 working, and further tweaks
davidwrighton Mar 5, 2024
2eb6eb8
Enable X86
davidwrighton Mar 5, 2024
aa741bc
Update X64 and Arm64 Unix helpers to new sequence
davidwrighton Mar 5, 2024
f805eda
Enable new model for Arm32 by removing all special cases for Arm32
davidwrighton Mar 5, 2024
d463f59
Remove DomainLocalBlock and StaticBoxInit crst types
davidwrighton Mar 5, 2024
6aed90a
Fix Tls index setting in R2R code
davidwrighton Mar 6, 2024
1bb643a
Save a little bit of code size on X64
davidwrighton Mar 6, 2024
02ee7a1
Fix build breaks on unix
davidwrighton Mar 6, 2024
e3e8cd6
Fix Unix X64 build break
davidwrighton Mar 6, 2024
92153b0
Merge with change introduced by #97590
davidwrighton Mar 6, 2024
a8f9b73
Fix allocation of thread static boxes
davidwrighton Mar 6, 2024
d37f612
Remove custom assembly helpers for statics access
davidwrighton Mar 6, 2024
0c0545e
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Mar 6, 2024
6a9a062
Expose the ability to look at simplified statics through a new ISOSDa…
davidwrighton Mar 7, 2024
abe8a97
Fix missing helper, used by collectible scenario
davidwrighton Mar 7, 2024
3380e00
Delete ThreadStaticHandleTable
davidwrighton Mar 7, 2024
785f32f
Fixup collectible assembly static handling to work correctly again
davidwrighton Mar 11, 2024
504d93e
Missed allocation of LoaderAllocatorHandle for the collectible static…
davidwrighton Mar 11, 2024
8afc63e
Implement collectible thread statics
davidwrighton Mar 13, 2024
b8ef938
Handle scenario with a RVA statc field and a class constructor, but n…
davidwrighton Mar 13, 2024
fce7f9f
Fix static field reading for R2R
davidwrighton Mar 14, 2024
8bd309c
Attempt to fixup arm32 behavior
davidwrighton Mar 14, 2024
6cb70fa
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Mar 14, 2024
7db100e
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Mar 14, 2024
1595cf0
Continued fallout from my possibly ill considered decision to make th…
davidwrighton Mar 15, 2024
961744d
Fix InFlightTLSData so that values are properly kept for thread stati…
davidwrighton Mar 15, 2024
69de672
Fix oops in statics allocation
davidwrighton Mar 18, 2024
57c3025
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Mar 19, 2024
94b58ed
Zero out cTLSData when cleaning up thread statics
davidwrighton Mar 19, 2024
170f74c
Fix static field alignment on 32bit platforms
davidwrighton Mar 19, 2024
87ae678
Fix handling of cleared markers for thread statics
davidwrighton Mar 20, 2024
a1b5e17
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Mar 21, 2024
4543b03
Update comment
davidwrighton Mar 21, 2024
53a68a0
Fix TLS indices to be pointer indexed offsets
davidwrighton Mar 21, 2024
378ecc1
Finish updates that I meant to make in previous commit
davidwrighton Mar 22, 2024
f38ae83
Copy and zero memory correctly
davidwrighton Mar 22, 2024
66cd564
Fix thread static reporting when indices are per pointer offset value
davidwrighton Mar 25, 2024
0e7c1d4
Update R2R version and update comment on thread statics
davidwrighton Mar 25, 2024
446a60e
Add missing semicolon
davidwrighton Mar 25, 2024
b2850ea
Jit formatting round 1
davidwrighton Mar 25, 2024
d526181
Update InitClass helper data
davidwrighton Mar 25, 2024
e2aa42f
Revert "Update R2R version and update comment on thread statics"
davidwrighton Mar 26, 2024
24801db
Update thread statics comments
davidwrighton Mar 26, 2024
662579b
Just bump R2R headers
davidwrighton Mar 26, 2024
43e4e52
Update SOS_BREAKING_CHANGE_VERSION
davidwrighton Mar 28, 2024
37ee3e9
Move fast get hashcode flags near to each other.
davidwrighton Mar 28, 2024
07f7d14
Use a new HandleType for managing interior pointers instead of the pr…
davidwrighton Mar 28, 2024
cd157be
Merge branch 'main' of https://github.com/dotnet/runtime into make_no…
davidwrighton Mar 28, 2024
e8273e6
Fix build break
davidwrighton Mar 29, 2024
4b27a95
Rework Thread static changes to make non-collectible tls data have a …
davidwrighton Apr 18, 2024
f111ecd
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Apr 18, 2024
f6aaa69
Update JIT interface guid again
davidwrighton Apr 18, 2024
61823a4
Fixed build breaks caused by merge, and code review comments
davidwrighton Apr 18, 2024
99c678a
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Apr 18, 2024
5914558
Fix comment and version number
davidwrighton Apr 18, 2024
4563623
Fix issues noted in testing
davidwrighton Apr 19, 2024
11c671f
Fix another oops
davidwrighton Apr 19, 2024
bc16c62
Merge commit 'a344abdd6fa1283aba3b18c882fe780447b3bad2' into make_nor…
davidwrighton Apr 19, 2024
ec88375
Extra checks for thread cleanup paths operating in parallel
davidwrighton Apr 22, 2024
0ef9bb1
- Fix incorrect assert that fires in the presence of non-collectible …
davidwrighton Apr 22, 2024
53cd1f6
Add some checks to try to avoid deadlocks on shutdown
davidwrighton Apr 23, 2024
160acba
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Apr 29, 2024
cacb466
Implement direct access to TLS data on the ThreadLocalData structure
davidwrighton Apr 29, 2024
1053165
Fix missing enum value
davidwrighton Apr 30, 2024
43abbf3
DynamicallyAllocatedThreadLocalData_data
davidwrighton Apr 30, 2024
42fffaa
Now it allocates at the byte level to be a bit more efficient, and re…
davidwrighton Apr 30, 2024
8d9ddba
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Apr 30, 2024
35c935e
Jit format and GCC build changes
davidwrighton May 1, 2024
d48ef55
Try to fix the musl validation leg
davidwrighton May 1, 2024
638ea50
Attempt to fix even more build nits
davidwrighton May 1, 2024
bcff9aa
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton May 1, 2024
fc67ecd
Fix next set of musl validation errors
davidwrighton May 1, 2024
4e2e0c2
Add statics heap specifically for non-collectible non-gc statics
davidwrighton May 3, 2024
4e78250
Fix naming for thread local static field names to be something which …
davidwrighton May 3, 2024
02b5899
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton May 3, 2024
100c2ad
Delete Statics heap at correct time
davidwrighton May 3, 2024
3888af5
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton May 6, 2024
270e991
Code review updates
davidwrighton May 7, 2024
2db5ffd
Initial pass at a BoTR chapter update.
davidwrighton May 8, 2024
0be084d
Get rid of the complicated GC interaction model for collectible assem…
davidwrighton May 8, 2024
8d7243b
Fix contract violation
davidwrighton May 8, 2024
b08d8eb
Fix markdownlint
davidwrighton May 8, 2024
a94b00c
Merge branch 'main' of https://github.com/dotnet/runtime into make_no…
davidwrighton May 14, 2024
3b94fa0
Adjust to code review feedback
davidwrighton May 14, 2024
e702b91
Merge branch 'main' of https://github.com/dotnet/runtime into make_no…
davidwrighton May 24, 2024
ecd26bc
Code review comments
davidwrighton May 24, 2024
42f3eb9
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton May 25, 2024
a6225c1
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton May 28, 2024
548842e
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton May 31, 2024
e6f47d1
Fix details found while examining diagnostic tests with this change
davidwrighton Jun 3, 2024
973a0f8
t status
davidwrighton Jun 3, 2024
71a4ae9
Get rid of the asserts from the Profiler tls reading path when runnin…
davidwrighton Jun 4, 2024
5afc45a
Code review feedback
davidwrighton Jun 7, 2024
8ca9b7c
Fix test to actually be valid
davidwrighton Jun 12, 2024
07f1739
Merge branch 'main' of github.com:dotnet/runtime into make_normal_sta…
davidwrighton Jun 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ internal unsafe struct MethodTableAuxiliaryData
[FieldOffset(0)]
private uint Flags;

private const uint enum_flag_CanCompareBitsOrUseFastGetHashCode = 0x0001; // Is any field type or sub field type overrode Equals or GetHashCode
private const uint enum_flag_CanCompareBitsOrUseFastGetHashCode = 0x0400; // Is any field type or sub field type overrode Equals or GetHashCode
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
private const uint enum_flag_CanCompareBitsOrUseFastGetHashCode = 0x0400; // Is any field type or sub field type overrode Equals or GetHashCode
private const uint enum_flag_CanCompareBitsOrUseFastGetHashCode = 0x0004; // Is any field type or sub field type overrode Equals or GetHashCode

Also move it after enum_flag_HasCheckedCanCompareBitsOrUseFastGetHashCode

private const uint enum_flag_HasCheckedCanCompareBitsOrUseFastGetHashCode = 0x0002; // Whether we have checked the overridden Equals or GetHashCode

public bool HasCheckedCanCompareBitsOrUseFastGetHashCode => (Flags & enum_flag_HasCheckedCanCompareBitsOrUseFastGetHashCode) != 0;
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/debug/daccess/daccess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3231,6 +3231,10 @@ ClrDataAccess::QueryInterface(THIS_
{
ifaceRet = static_cast<ISOSDacInterface13*>(this);
}
else if (IsEqualIID(interfaceId, __uuidof(ISOSDacInterface14)))
{
ifaceRet = static_cast<ISOSDacInterface14*>(this);
}
else
{
*iface = NULL;
Expand Down
12 changes: 2 additions & 10 deletions src/coreclr/debug/daccess/dacdbiimpl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1577,16 +1577,8 @@ void DacDbiInterfaceImpl::GetStaticsBases(TypeHandle thExact,
PTR_BYTE * ppNonGCStaticsBase)
{
MethodTable * pMT = thExact.GetMethodTable();
Module * pModuleForStatics = pMT->GetModuleForStatics();
if (pModuleForStatics != NULL)
{
PTR_DomainLocalModule pLocalModule = pModuleForStatics->GetDomainLocalModule();
if (pLocalModule != NULL)
{
*ppGCStaticsBase = pLocalModule->GetGCStaticsBasePointer(pMT);
*ppNonGCStaticsBase = pLocalModule->GetNonGCStaticsBasePointer(pMT);
}
}
*ppGCStaticsBase = pMT->GetGCStaticsBasePointer();
*ppNonGCStaticsBase = pMT->GetNonGCStaticsBasePointer();
} // DacDbiInterfaceImpl::GetStaticsBases

//-----------------------------------------------------------------------------
Expand Down
8 changes: 7 additions & 1 deletion src/coreclr/debug/daccess/dacimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,8 @@ class ClrDataAccess
public ISOSDacInterface10,
public ISOSDacInterface11,
public ISOSDacInterface12,
public ISOSDacInterface13
public ISOSDacInterface13,
public ISOSDacInterface14
{
public:
ClrDataAccess(ICorDebugDataTarget * pTarget, ICLRDataTarget * pLegacyTarget=0);
Expand Down Expand Up @@ -1216,6 +1217,11 @@ class ClrDataAccess
virtual HRESULT STDMETHODCALLTYPE GetGCFreeRegions(ISOSMemoryEnum **ppEnum);
virtual HRESULT STDMETHODCALLTYPE LockedFlush();

// ISOSDacInterface14
virtual HRESULT STDMETHODCALLTYPE GetStaticBaseAddress(CLRDATA_ADDRESS methodTable, BOOL isGCStaticBase, CLRDATA_ADDRESS *address);
virtual HRESULT STDMETHODCALLTYPE GetThreadStaticBaseAddress(CLRDATA_ADDRESS methodTable, CLRDATA_ADDRESS thread, BOOL isGCStaticBase, CLRDATA_ADDRESS *address);
virtual HRESULT STDMETHODCALLTYPE GetMethodTableInitializationFlags(CLRDATA_ADDRESS methodTable, MethodTableInitializationFlags *initializationStatus);

//
// ClrDataAccess.
//
Expand Down
180 changes: 118 additions & 62 deletions src/coreclr/debug/daccess/request.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1640,8 +1640,8 @@ ClrDataAccess::GetModuleData(CLRDATA_ADDRESS addr, struct DacpModuleData *Module
ModuleData->bIsReflection = pModule->IsReflection();
ModuleData->bIsPEFile = pModule->IsPEFile();
ModuleData->Assembly = HOST_CDADDR(pModule->GetAssembly());
ModuleData->dwModuleID = pModule->GetModuleID();
ModuleData->dwModuleIndex = pModule->GetModuleIndex().m_dwIndex;
ModuleData->dwModuleID = 0; // CoreCLR no longer has this concept
ModuleData->dwModuleIndex = 0; // CoreCLR no longer has this concept
ModuleData->dwTransientFlags = pModule->m_dwTransientFlags;
ModuleData->LoaderAllocator = HOST_CDADDR(pModule->m_loaderAllocator);
ModuleData->ThunkHeap = HOST_CDADDR(pModule->m_pThunkHeap);
Expand Down Expand Up @@ -3171,47 +3171,16 @@ ClrDataAccess::GetNestedExceptionData(CLRDATA_ADDRESS exception, CLRDATA_ADDRESS
HRESULT
ClrDataAccess::GetDomainLocalModuleData(CLRDATA_ADDRESS addr, struct DacpDomainLocalModuleData *pLocalModuleData)
{
if (addr == 0 || pLocalModuleData == NULL)
return E_INVALIDARG;

SOSDacEnter();

DomainLocalModule* pLocalModule = PTR_DomainLocalModule(TO_TADDR(addr));

pLocalModuleData->pGCStaticDataStart = TO_CDADDR(PTR_TO_TADDR(pLocalModule->GetPrecomputedGCStaticsBasePointer()));
pLocalModuleData->pNonGCStaticDataStart = TO_CDADDR(pLocalModule->GetPrecomputedNonGCStaticsBasePointer());
pLocalModuleData->pDynamicClassTable = PTR_CDADDR(pLocalModule->m_pDynamicClassTable.Load());
pLocalModuleData->pClassData = (TADDR) (PTR_HOST_MEMBER_TADDR(DomainLocalModule, pLocalModule, m_pDataBlob));

SOSDacLeave();
return hr;
// CoreCLR does not use domain local modules anymore
Copy link
Member

@jkotas jkotas Mar 27, 2024

Choose a reason for hiding this comment

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

Does this need to come with SOS_BREAKING_CHANGE_VERSION bump?

Copy link
Member

Choose a reason for hiding this comment

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

The check/warning message in SOS is only done for commands that assume runtime data structure layout like dumplog, threads -special, printexception. These 2 APIs are called in dumpobj which doesn't do the check and will fail with no warning.

It looks like SOS should do the check/warning on every command. I didn't consider these type of API breaking changes just layout changes when I added the checks. I'll add a SOS tracking issue to address this.

In the end, yes, SOS_BREAKING_CHANGE_VERSION should be bumped.

Copy link
Member Author

@davidwrighton davidwrighton Mar 27, 2024

Choose a reason for hiding this comment

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

Interesting. I had interpreted the failures in !dumpobj as pretty reasonable and not breaking. The way it failed is fairly graceful, as instead of crashing, SOS would simply report "<no information>" for normal statics, and skip reporting for any TLS statics.

Copy link
Member

Choose a reason for hiding this comment

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

I'll add a SOS tracking issue to address this.

It impacts clrmd too.

SOS would simply report "" for normal statics, and skip reporting for any TLS statics.

I think it is hard for a random person out there to connect the dots between SOS failing to dump the statics and needing a newer SOS version to fix that.

return E_NOTIMPL;
}


HRESULT
ClrDataAccess::GetDomainLocalModuleDataFromModule(CLRDATA_ADDRESS addr, struct DacpDomainLocalModuleData *pLocalModuleData)
{
if (addr == 0 || pLocalModuleData == NULL)
return E_INVALIDARG;

SOSDacEnter();

Module* pModule = PTR_Module(TO_TADDR(addr));
DomainLocalModule* pLocalModule = PTR_DomainLocalModule(pModule->GetDomainLocalModule());
if (!pLocalModule)
{
hr = E_INVALIDARG;
}
else
{
pLocalModuleData->pGCStaticDataStart = TO_CDADDR(PTR_TO_TADDR(pLocalModule->GetPrecomputedGCStaticsBasePointer()));
pLocalModuleData->pNonGCStaticDataStart = TO_CDADDR(pLocalModule->GetPrecomputedNonGCStaticsBasePointer());
pLocalModuleData->pDynamicClassTable = PTR_CDADDR(pLocalModule->m_pDynamicClassTable.Load());
pLocalModuleData->pClassData = (TADDR) (PTR_HOST_MEMBER_TADDR(DomainLocalModule, pLocalModule, m_pDataBlob));
}

SOSDacLeave();
return hr;
// CoreCLR does not use domain local modules anymore
return E_NOTIMPL;
}

HRESULT
Expand All @@ -3224,31 +3193,8 @@ ClrDataAccess::GetDomainLocalModuleDataFromAppDomain(CLRDATA_ADDRESS appDomainAd
HRESULT
ClrDataAccess::GetThreadLocalModuleData(CLRDATA_ADDRESS thread, unsigned int index, struct DacpThreadLocalModuleData *pLocalModuleData)
{
if (pLocalModuleData == NULL)
return E_INVALIDARG;

SOSDacEnter();

pLocalModuleData->threadAddr = thread;
pLocalModuleData->ModuleIndex = index;

PTR_Thread pThread = PTR_Thread(TO_TADDR(thread));
PTR_ThreadLocalBlock pLocalBlock = ThreadStatics::GetCurrentTLB(pThread);
PTR_ThreadLocalModule pLocalModule = pLocalBlock->GetTLMIfExists(ModuleIndex(index));
if (!pLocalModule)
{
hr = E_INVALIDARG;
}
else
{
pLocalModuleData->pGCStaticDataStart = TO_CDADDR(PTR_TO_TADDR(pLocalModule->GetPrecomputedGCStaticsBasePointer()));
pLocalModuleData->pNonGCStaticDataStart = TO_CDADDR(pLocalModule->GetPrecomputedNonGCStaticsBasePointer());
pLocalModuleData->pDynamicClassTable = PTR_CDADDR(pLocalModule->m_pDynamicClassTable);
pLocalModuleData->pClassData = (TADDR) (PTR_HOST_MEMBER_TADDR(ThreadLocalModule, pLocalModule, m_pDataBlob));
}

SOSDacLeave();
return hr;
// CoreCLR does not use thread local modules anymore
return E_NOTIMPL;
}


Expand Down Expand Up @@ -5401,3 +5347,113 @@ HRESULT ClrDataAccess::LockedFlush()
SOSDacLeave();
return hr;
}

HRESULT STDMETHODCALLTYPE ClrDataAccess::GetStaticBaseAddress(CLRDATA_ADDRESS methodTable, BOOL isGCStaticBase, CLRDATA_ADDRESS *address)
{
if (!address)
return E_POINTER;

if (!methodTable)
return E_INVALIDARG;

SOSDacEnter();

PTR_MethodTable mTable = PTR_MethodTable(TO_TADDR(methodTable));

BOOL bIsFree = FALSE;
if (!DacValidateMethodTable(mTable, bIsFree))
{
hr = E_INVALIDARG;
}
else
{
if (!mTable->IsDynamicStatics())
{
*address = 0;
}
if (isGCStaticBase)
{
*address = PTR_CDADDR(mTable->GetGCStaticsBasePointer());
}
else
{
*address = PTR_CDADDR(mTable->GetNonGCStaticsBasePointer());
}
}

SOSDacLeave();
return hr;
}


HRESULT STDMETHODCALLTYPE ClrDataAccess::GetThreadStaticBaseAddress(CLRDATA_ADDRESS methodTable, CLRDATA_ADDRESS threadPtr, BOOL isGCStaticBase, CLRDATA_ADDRESS *address)
{
if (!address)
return E_POINTER;

if (!methodTable)
return E_INVALIDARG;

if (!threadPtr)
return E_INVALIDARG;

SOSDacEnter();

PTR_MethodTable mTable = PTR_MethodTable(TO_TADDR(methodTable));
PTR_Thread thread = PTR_Thread(TO_TADDR(threadPtr));


BOOL bIsFree = FALSE;
if (!DacValidateMethodTable(mTable, bIsFree))
{
hr = E_INVALIDARG;
}
else
{
if (mTable->GetClass()->GetNumThreadStaticFields() == 0)
{
*address = 0;
}
if (isGCStaticBase)
{
*address = PTR_CDADDR(mTable->GetGCThreadStaticsBasePointer(thread));
}
else
{
*address = PTR_CDADDR(mTable->GetNonGCThreadStaticsBasePointer(thread));
}
}

SOSDacLeave();
return hr;
}

HRESULT STDMETHODCALLTYPE ClrDataAccess::GetMethodTableInitializationFlags(CLRDATA_ADDRESS methodTable, MethodTableInitializationFlags *initializationStatus)
{
if (!methodTable)
return E_INVALIDARG;

if (!initializationStatus)
return E_POINTER;

SOSDacEnter();

*initializationStatus = (MethodTableInitializationFlags)0;
PTR_MethodTable mTable = PTR_MethodTable(TO_TADDR(methodTable));
BOOL bIsFree = FALSE;
if (!DacValidateMethodTable(mTable, bIsFree))
{
hr = E_INVALIDARG;
}
else
{
*initializationStatus = mTable->IsClassInited() ? MethodTableInitialized : (MethodTableInitializationFlags)0;
if (mTable->GetAuxiliaryData()->IsInitError())
{
*initializationStatus = (MethodTableInitializationFlags)(*initializationStatus | MethodTableInitializationFailed);
}
}

SOSDacLeave();
return hr;
}
18 changes: 9 additions & 9 deletions src/coreclr/inc/CrstTypes.def
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ End
Crst DelegateToFPtrHash
End

Crst DomainLocalBlock
Crst GenericDictionaryExpansion
AcquiredBefore PinnedHeapHandleTable IbcProfile LoaderHeap SystemDomainDelayedUnloadList UniqueStack
End

Expand Down Expand Up @@ -265,7 +265,7 @@ Crst InstMethodHashTable
End

Crst Interop
AcquiredBefore PinnedHeapHandleTable AvailableParamTypes ClassInit DeadlockDetection DomainLocalBlock
AcquiredBefore PinnedHeapHandleTable AvailableParamTypes ClassInit DeadlockDetection GenericDictionaryExpansion
HandleTable InstMethodHashTable InteropData JitGenericHandleCache LoaderHeap SigConvert
StubDispatchCache StubUnwindInfoHeapSegments SyncBlockCache TypeIDMap UnresolvedClassLock
PendingTypeLoadEntry
Expand Down Expand Up @@ -315,7 +315,7 @@ End

Crst LoaderAllocator
AcquiredBefore PinnedHeapHandleTable HandleTable UniqueStack ThreadStore
AcquiredAfter DomainLocalBlock
AcquiredAfter GenericDictionaryExpansion
End

Crst LoaderAllocatorReferences
Expand Down Expand Up @@ -364,7 +364,7 @@ End
Crst PendingTypeLoadEntry
AcquiredBefore AppDomainCache PinnedHeapHandleTable AssemblyLoader AvailableClass AvailableParamTypes
BaseDomain ClassInit DeadlockDetection DebuggerController DebuggerJitInfo DebuggerMutex
DomainLocalBlock Exception ExecuteManRangeLock FuncPtrStubs
GenericDictionaryExpansion Exception ExecuteManRangeLock FuncPtrStubs
FusionAppCtx GlobalStrLiteralMap HandleTable IbcProfile
IJWFixupData IJWHash ISymUnmanagedReader Jit JumpStubCache LoaderHeap
Module ModuleLookupTable PEImage
Expand Down Expand Up @@ -476,6 +476,10 @@ End
Crst SystemDomainDelayedUnloadList
End

Crst ThreadLocalStorageLock
AcquiredBefore ModuleLookupTable
End

Crst ThreadIdDispenser
End

Expand Down Expand Up @@ -541,7 +545,7 @@ End

Crst EventPipe
AcquiredAfter PendingTypeLoadEntry
AcquiredBefore ThreadIdDispenser ThreadStore DomainLocalBlock InstMethodHashTable
AcquiredBefore ThreadIdDispenser ThreadStore GenericDictionaryExpansion InstMethodHashTable
End

Crst NotifyGdb
Expand Down Expand Up @@ -574,10 +578,6 @@ Crst PgoData
AcquiredBefore LoaderHeap
End

Crst StaticBoxInit
AcquiredBefore LoaderHeap FrozenObjectHeap AssemblyLoader
End

Crst PerfMap
AcquiredAfter CodeVersioning AssemblyList
End
2 changes: 0 additions & 2 deletions src/coreclr/inc/corcompile.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ enum CORCOMPILE_FIXUP_BLOB_KIND
ENCODE_VERIFY_IL_BODY, /* Verify an IL body is defined the same at compile time and runtime. A failed match will cause a hard runtime failure. */

ENCODE_MODULE_HANDLE = 0x50, /* Module token */
ENCODE_MODULE_ID_FOR_GENERIC_STATICS, /* For accessing static fields */
ENCODE_CLASS_ID_FOR_STATICS, /* For accessing static fields */
ENCODE_SYNC_LOCK, /* For synchronizing access to a type */
ENCODE_PROFILING_HANDLE, /* For the method's profiling counter */
ENCODE_VARARGS_METHODDEF, /* For calling a varargs method */
Expand Down
Loading
Loading