Replace multi-loaderallocator hash implementation in MethodDescBackpatchInfo (dotnet...
authorDavid Wrighton <davidwr@microsoft.com>
Fri, 15 Feb 2019 01:07:14 +0000 (17:07 -0800)
committerGitHub <noreply@github.com>
Fri, 15 Feb 2019 01:07:14 +0000 (17:07 -0800)
commit29f945dbab67079652f5e2db7b9e5a9be956355e
treee2088f00f8fa52a774e3d142c81313b88bb693a4
parent2adfb96daf168bcaebb9342f60743a1cb42c67a2
Replace multi-loaderallocator hash implementation in MethodDescBackpatchInfo (dotnet/coreclr#22285)

* GCHeapHash
- Hashtable implementation for runtime use
- Implementation written in C++
- Data storage in managed heap memory
- Based on SHash design, but using managed memory

CrossLoaderAllocatorHash
- Hash for c++ Pointer to C++ pointer where the lifetimes are controlled by different loader allocators
 - Support for add/remove/visit all entries of 1 key/visit all entries/ remove all entries of 1 key
- Supports holding data which is unmanaged, but data items themselves can be of any size (key/value are templated types)

* Swap MethodDescBackpatchInfo to use the CrossLoaderAllocatorHash

* The MethodDescBackpatchCrst needs to be around an allocation
- Adjust the Crst so that it can safely be used around code which allocates
- Required moving its use out from within the EESuspend logic used in rejit

Commit migrated from https://github.com/dotnet/coreclr/commit/423d2a3b91feea18ab361da04d5cc24bdff157d0
23 files changed:
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CrossLoaderAllocatorHashHelpers.cs [new file with mode: 0644]
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs [new file with mode: 0644]
src/coreclr/src/inc/CrstTypes.def
src/coreclr/src/inc/crsttypes.h
src/coreclr/src/vm/appdomain.cpp
src/coreclr/src/vm/codeversion.cpp
src/coreclr/src/vm/crossloaderallocatorhash.h [new file with mode: 0644]
src/coreclr/src/vm/crossloaderallocatorhash.inl [new file with mode: 0644]
src/coreclr/src/vm/frames.h
src/coreclr/src/vm/gcheaphashtable.h [new file with mode: 0644]
src/coreclr/src/vm/gcheaphashtable.inl [new file with mode: 0644]
src/coreclr/src/vm/loaderallocator.cpp
src/coreclr/src/vm/loaderallocator.hpp
src/coreclr/src/vm/method.cpp
src/coreclr/src/vm/methoddescbackpatchinfo.cpp
src/coreclr/src/vm/methoddescbackpatchinfo.h
src/coreclr/src/vm/mscorlib.h
src/coreclr/src/vm/object.cpp
src/coreclr/src/vm/object.h
src/coreclr/src/vm/prestub.cpp
src/coreclr/src/vm/rejit.cpp
src/coreclr/src/vm/tieredcompilation.cpp