diff options
author | David Wrighton <davidwr@microsoft.com> | 2019-02-14 17:07:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-14 17:07:14 -0800 |
commit | 423d2a3b91feea18ab361da04d5cc24bdff157d0 (patch) | |
tree | e59d54a5c48322a09ef1a4c5325378c9f60171dd /src/vm/mscorlib.h | |
parent | 89e78f42ba11beaa81635a75cf593a3713dba176 (diff) | |
download | coreclr-423d2a3b91feea18ab361da04d5cc24bdff157d0.tar.gz coreclr-423d2a3b91feea18ab361da04d5cc24bdff157d0.tar.bz2 coreclr-423d2a3b91feea18ab361da04d5cc24bdff157d0.zip |
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
Diffstat (limited to 'src/vm/mscorlib.h')
-rw-r--r-- | src/vm/mscorlib.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/vm/mscorlib.h b/src/vm/mscorlib.h index 3298de3eee..52e4508446 100644 --- a/src/vm/mscorlib.h +++ b/src/vm/mscorlib.h @@ -1393,6 +1393,25 @@ DEFINE_CLASS(OBJECT_EQUALITYCOMPARER, CollectionsGeneric, ObjectEqualityComparer DEFINE_CLASS(INATTRIBUTE, Interop, InAttribute) +DEFINE_CLASS_U(CompilerServices, GCHeapHash, GCHeapHashObject) +DEFINE_FIELD_U(_data, GCHeapHashObject, _data) +DEFINE_FIELD_U(_count, GCHeapHashObject, _count) +DEFINE_FIELD_U(_deletedCount, GCHeapHashObject, _deletedCount) + +DEFINE_CLASS(GCHEAPHASH, CompilerServices, GCHeapHash) + +DEFINE_CLASS_U(CompilerServices, LAHashDependentHashTracker, LAHashDependentHashTrackerObject) +DEFINE_FIELD_U(_dependentHandle, LAHashDependentHashTrackerObject,_dependentHandle) +DEFINE_FIELD_U(_loaderAllocator, LAHashDependentHashTrackerObject,_loaderAllocator) + +DEFINE_CLASS(LAHASHDEPENDENTHASHTRACKER, CompilerServices, LAHashDependentHashTracker) + +DEFINE_CLASS_U(CompilerServices, LAHashKeyToTrackers, LAHashKeyToTrackersObject) +DEFINE_FIELD_U(_trackerOrTrackerSet, LAHashKeyToTrackersObject, _trackerOrTrackerSet) +DEFINE_FIELD_U(_laLocalKeyValueStore, LAHashKeyToTrackersObject, _laLocalKeyValueStore) + +DEFINE_CLASS(LAHASHKEYTOTRACKERS, CompilerServices, LAHashKeyToTrackers) + #undef DEFINE_CLASS #undef DEFINE_METHOD #undef DEFINE_FIELD |