Replace multi-loaderallocator hash implementation in MethodDescBackpatchInfo (#22285)
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)
commit423d2a3b91feea18ab361da04d5cc24bdff157d0
treee59d54a5c48322a09ef1a4c5325378c9f60171dd
parent89e78f42ba11beaa81635a75cf593a3713dba176
Replace multi-loaderallocator hash implementation in MethodDescBackpatchInfo (#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
23 files changed:
src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/System.Private.CoreLib/src/System/Runtime/CompilerServices/CrossLoaderAllocatorHashHelpers.cs [new file with mode: 0644]
src/System.Private.CoreLib/src/System/Runtime/CompilerServices/GCHeapHash.cs [new file with mode: 0644]
src/inc/CrstTypes.def
src/inc/crsttypes.h
src/vm/appdomain.cpp
src/vm/codeversion.cpp
src/vm/crossloaderallocatorhash.h [new file with mode: 0644]
src/vm/crossloaderallocatorhash.inl [new file with mode: 0644]
src/vm/frames.h
src/vm/gcheaphashtable.h [new file with mode: 0644]
src/vm/gcheaphashtable.inl [new file with mode: 0644]
src/vm/loaderallocator.cpp
src/vm/loaderallocator.hpp
src/vm/method.cpp
src/vm/methoddescbackpatchinfo.cpp
src/vm/methoddescbackpatchinfo.h
src/vm/mscorlib.h
src/vm/object.cpp
src/vm/object.h
src/vm/prestub.cpp
src/vm/rejit.cpp
src/vm/tieredcompilation.cpp