Skip to content

Commit

Permalink
Update CoreCLR headers from dotnet/coreclr:release/3.0 (DataDog#524)
Browse files Browse the repository at this point in the history
Additionally, update il_rewriter.cpp to fix a Linux build break with the `_countof` definition.
  • Loading branch information
zacharycmontoya authored Oct 28, 2019
1 parent cbba883 commit c16e49d
Show file tree
Hide file tree
Showing 149 changed files with 7,477 additions and 21,860 deletions.
6 changes: 5 additions & 1 deletion lib/coreclr/src/inc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ set( CORGUIDS_IDL_SOURCES
xclrdata.idl
corprof.idl
corpub.idl
gchost.idl
mscorsvc.idl
clrprivappxhosting.idl
clrprivbinding.idl
Expand Down Expand Up @@ -50,7 +49,12 @@ else()

# The prebuilt files contain extra '!_MIDL_USE_GUIDDEF_' after the #endif, but not in the comment.
# In order to not to have to modify these prebuilt files, we disable the extra tokens warning.
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wno-extra-tokens)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-Wno-endif-labels)
endif()

add_compile_options(-D_MIDL_USE_GUIDDEF_)
foreach(IDL_SOURCE IN LISTS CORGUIDS_IDL_SOURCES)
get_filename_component(IDLNAME ${IDL_SOURCE} NAME_WE)
Expand Down
6 changes: 5 additions & 1 deletion lib/coreclr/src/inc/CrstTypeTool.cs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,11 @@ void WriteHeaderFile(string fileName)
writer.WriteLine("int g_rgCrstLevelMap[] =");
writer.WriteLine("{");
foreach (CrstType crst in crsts)
writer.WriteLine(" " + crst.Level + ",\t\t\t// Crst" + crst.Name);
{
string crstLine = " " + crst.Level + ",";
crstLine = crstLine + new string(' ', 16 - crstLine.Length);
writer.WriteLine(crstLine + "// Crst" + crst.Name);
}
writer.WriteLine("};");
writer.WriteLine();

Expand Down
152 changes: 35 additions & 117 deletions lib/coreclr/src/inc/CrstTypes.def
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,7 @@
// running our test suites). Feel free to add meaningful comments to existing rules if you feel they can
// usefully clarify the reasons for particular dependencies.
//
// CrstTypeTool is a csScript file at file:..\..\bin\CrstTypeTool.csScript. Simply typing "CrstTypeTool" from a
// clrenv command window prompt should rebuild file:CrstTypes.h from the current CrstTypes.def (again,
// remember to check out CrstTypes.h first).
// Note: If you cannot run the script from command line, because of this error:
// Script language type is unsupported.
// Use /? for more help on usage.
// Or because .csscript extension is not associated with anything on your machine,
// Then use "csc.exe CrstTypeTool.csscript" from ClrEnv environment and run the resulting executable.
// See CrstTypeTool.cs for how to consume this file.
//
// Each Crst type definition is currently in alphabetical order. Please maintain this convention.
//
Expand All @@ -86,7 +79,7 @@ Crst AllowedFiles
End

Crst AppDomainCache
AcquiredBefore FusionBindContext FusionLoadContext LoaderHeap UniqueStack UnresolvedClassLock
AcquiredBefore UniqueStack UnresolvedClassLock
End

Crst AppDomainHandleTable
Expand All @@ -112,7 +105,7 @@ Crst AssemblyDependencyGraph
End

Crst AvailableParamTypes
AcquiredBefore FusionBindContext FusionLoadContext IbcProfile LoaderHeap
AcquiredBefore IbcProfile LoaderHeap
End

Crst BaseDomain
Expand Down Expand Up @@ -160,7 +153,7 @@ End
Crst Contexts
AcquiredBefore AvailableParamTypes Cer ClassInit DeadlockDetection DomainLocalBlock FuncPtrStubs
GlobalStrLiteralMap Jit LoaderHeap ModuleLookupTable RWLock SigConvert SingleUseLock
StubUnwindInfoHeapSegments SyncBlockCache TypeIDMap UnresolvedClassLock FusionClosure
StubUnwindInfoHeapSegments SyncBlockCache TypeIDMap UnresolvedClassLock
End

Crst CoreCLRBinderLog
Expand Down Expand Up @@ -207,7 +200,7 @@ End
// It's the largest of the debugger locks.
Crst DebuggerMutex
AcquiredBefore AvailableParamTypes ConnectionNameTable
DynamicIL LoaderHeap ModuleLookupTable ThreadStore
DynamicIL LoaderHeap ModuleLookupTable

// Disabled per bug 581892
// AcquiredBefore DebuggerController
Expand Down Expand Up @@ -279,71 +272,9 @@ Crst FuncPtrStubs
End

Crst FusionAppCtx
AcquiredBefore FusionPolicyConfigPool FusionSingleUse FusionAssemblyDownload
End

Crst FusionAssemblyDownload
AcquiredBefore FusionDownload UniqueStack
End

Crst FusionBindResult
End

Crst FusionClb
End

Crst FusionClosure
AcquiredBefore FusionBindContext FusionLoadContext FusionAppCtx FusionClosureGraph DomainLocalBlock ModuleFixup
End

Crst FusionClosureGraph
AcquiredBefore FusionAppCtx FusionBindContext FusionLoadContext
End

Crst FusionConfigSettings
End

Crst FusionDownload
End

Crst FusionLoadContext
AcquiredBefore PEImage
End

Crst FusionBindContext
AcquiredBefore PEImage
End

Crst FusionLog
AcquiredBefore IbcProfile UniqueStack
End

Crst FusionWarningLog
AcquiredBefore FusionBindContext FusionLoadContext FusionLog
End

Crst FusionNgenIndex
AcquiredBefore SystemDomainDelayedUnloadList
End

Crst FusionNgenIndexPool
AcquiredBefore SystemDomainDelayedUnloadList
End

Crst FusionPcyCache
End

Crst FusionPolicyConfigPool
AcquiredBefore UniqueStack
End

Crst FusionSingleUse
AcquiredBefore PEImage
End

Crst FusionIsoLibInit
End

Crst NativeBinderInit
Unordered
End
Expand All @@ -353,7 +284,7 @@ Crst NativeImageCache
End

Crst GCCover
AcquiredBefore LoaderHeap
AcquiredBefore LoaderHeap ReJITDomainTable
End

Crst GCMemoryPressure
Expand Down Expand Up @@ -389,7 +320,7 @@ Crst ILStubGen
End

Crst InstMethodHashTable
AcquiredBefore FusionBindContext FusionLoadContext LoaderHeap UniqueStack JumpStubCache
AcquiredBefore LoaderHeap UniqueStack JumpStubCache
End

Crst InterfaceVTableMap
Expand Down Expand Up @@ -430,8 +361,8 @@ End

Crst JumpStubCache
AcquiredBefore ExecuteManRangeLock LoaderHeap SingleUseLock
AcquiredAfter AppDomainCache ExecuteManLock FusionAssemblyDownload FusionNgenIndex FusionNgenIndexPool
ILStubGen SharedBaseDomain ThreadpoolTimerQueue ThreadpoolWaitThreads
AcquiredAfter AppDomainCache ExecuteManLock
ILStubGen ThreadpoolTimerQueue ThreadpoolWaitThreads
TPMethodTable TypeIDMap BaseDomain AssemblyLoader
End

Expand Down Expand Up @@ -502,30 +433,21 @@ End
Crst PatchEntryPoint
End

Crst PEFileSecurityManager
End

Crst PEImage
AcquiredBefore UniqueStack
End

Crst ILFingerprintCache
AcquiredBefore PEImage
End

Crst PEImagePDBStream
End

Crst PendingTypeLoadEntry
AcquiredBefore AppDomainCache AppDomainHandleTable AssemblyLoader AvailableClass AvailableParamTypes
BaseDomain ClassInit DeadlockDetection DebuggerController DebuggerJitInfo DebuggerMutex
DomainLocalBlock DynLinkZapItems Exception ExecuteManRangeLock FuncPtrStubs
FusionAppCtx FusionAssemblyDownload FusionBindResult FusionClosure FusionDownload
FusionBindContext FusionLoadContext FusionNgenIndex FusionNgenIndexPool FusionPcyCache
FusionPolicyConfigPool FusionSingleUse GlobalStrLiteralMap HandleTable IbcProfile
FusionAppCtx GlobalStrLiteralMap HandleTable IbcProfile
IJWFixupData IJWHash ISymUnmanagedReader Jit JumpStubCache LoaderHeap ModIntPairList
Module ModuleLookupTable PEImage SecurityStackwalkCache SharedAssemblyCreate
SharedBaseDomain SigConvert SingleUseLock StubDispatchCache StubUnwindInfoHeapSegments
SigConvert SingleUseLock StubDispatchCache StubUnwindInfoHeapSegments
SyncBlockCache SystemDomain ThreadIdDispenser ThreadStore TypeIDMap UnresolvedClassLock
SameLevelAs PendingTypeLoadEntry
End
Expand Down Expand Up @@ -567,28 +489,17 @@ Crst Reflection
AcquiredBefore LoaderHeap UnresolvedClassLock
End

// Used to synchronize all rejit information stored in a given AppDomain. One of these
// crsts exist per domain (except the SharedDomain--see below)
// Used to synchronize all rejit information stored in a given AppDomain.
Crst ReJITDomainTable
AcquiredBefore LoaderHeap SingleUseLock DeadlockDetection JumpStubCache DebuggerController
AcquiredAfter ReJITGlobalRequest ThreadStore GlobalStrLiteralMap SystemDomain DebuggerMutex
End

// Same as ReJITDomainTable, but this is for the SharedDomain's ReJitManager. Only
// reason we have a special type for the SharedDomain's ReJitManager is so that we can
// explicitly level this guy differently from ReJITDomainTable, so that both the
// SharedDomain's ReJitManager table lock AND one non-SharedDomain's ReJitManager table
// lock may be held simultaneously. This is useful during ETW rundown.
Crst ReJITSharedDomainTable
AcquiredBefore ReJITDomainTable
AcquiredAfter ReJITGlobalRequest ThreadStore GlobalStrLiteralMap SystemDomain DebuggerMutex
AcquiredBefore LoaderHeap SingleUseLock DeadlockDetection JumpStubCache DebuggerController FuncPtrStubs
AcquiredAfter ReJITGlobalRequest ThreadStore GlobalStrLiteralMap SystemDomain DebuggerMutex MethodDescBackpatchInfoTracker
End

// Used to synchronize all global requests (which may span multiple AppDomains) which add
// new functions to rejit tables, or request Reverts on existing functions in the rejit
// tables. One of these crsts exist per runtime.
Crst ReJITGlobalRequest
AcquiredBefore ThreadStore ReJITSharedDomainTable ReJITDomainTable SystemDomain
AcquiredBefore ThreadStore ReJITDomainTable SystemDomain
End

// ETW infrastructure uses this crst to protect a hash table of TypeHandles which is
Expand Down Expand Up @@ -622,24 +533,13 @@ End
Crst SaveModuleProfileData
End

Crst SecurityPolicyCache
End

Crst SecurityPolicyInit
AcquiredBefore SecurityPolicyCache
End

Crst SecurityStackwalkCache
End

Crst SharedAssemblyCreate
AcquiredBefore DeadlockDetection UniqueStack
End

Crst SharedBaseDomain
AcquiredBefore UniqueStack
End

Crst SigConvert
AcquiredBefore LoaderHeap
End
Expand Down Expand Up @@ -682,10 +582,11 @@ Crst SyncHashLock
End

Crst SystemBaseDomain
AcquiredBefore LoaderHeap UniqueStack
End

Crst SystemDomain
AcquiredBefore DebuggerMutex HandleTable IbcProfile SaveModuleProfileData SecurityPolicyCache
AcquiredBefore DebuggerMutex HandleTable IbcProfile SaveModuleProfileData
ThreadIdDispenser ThreadStore
End

Expand Down Expand Up @@ -719,7 +620,7 @@ Crst ThreadStore
DebuggerHeapLock DebuggerJitInfo DynamicIL ExecuteManRangeLock HandleTable IbcProfile
JitGenericHandleCache JumpStubCache LoaderHeap ModuleLookupTable ProfilingAPIStatus
ProfilerGCRefDataFreeList RWLock SingleUseLock SyncBlockCache SystemDomainDelayedUnloadList
ThreadIdDispenser ThreadStaticDataHashTable
ThreadIdDispenser ThreadStaticDataHashTable DebuggerMutex
End

Crst TPMethodTable
Expand Down Expand Up @@ -781,7 +682,12 @@ Crst InlineTrackingMap
AcquiredBefore IbcProfile
End

Crst JitInlineTrackingMap
AcquiredBefore ReJITDomainTable ThreadStore LoaderAllocator
End

Crst EventPipe
AcquiredAfter PendingTypeLoadEntry
AcquiredBefore ThreadIdDispenser ThreadStore DomainLocalBlock InstMethodHashTable
End

Expand All @@ -791,3 +697,15 @@ End
Crst ReadyToRunEntryPointToMethodDescMap
AcquiredBefore ExecuteManRangeLock UniqueStack
End

Crst TieredCompilation
AcquiredBefore ThreadpoolTimerQueue
End

Crst COMCallWrapper
End

Crst MethodDescBackpatchInfoTracker
AcquiredBefore FuncPtrStubs ThreadStore SystemDomain
AcquiredAfter ReJITGlobalRequest
End
Loading

0 comments on commit c16e49d

Please sign in to comment.