diff options
author | Fadi Hanna <fadim@microsoft.com> | 2016-06-21 11:51:05 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-21 11:51:05 -0700 |
commit | b9f5ae88cc49836c8d31f07db7800707165cdb06 (patch) | |
tree | c5d6246379b51c19e9c79489364da1e2a6fe79f5 /src/vm/codeman.cpp | |
parent | fb79613c44df5ad80831dba1460ffb14dd6497a3 (diff) | |
download | coreclr-b9f5ae88cc49836c8d31f07db7800707165cdb06.tar.gz coreclr-b9f5ae88cc49836c8d31f07db7800707165cdb06.tar.bz2 coreclr-b9f5ae88cc49836c8d31f07db7800707165cdb06.zip |
Generic dictionary minor performance improvement and simplification for R2R (#5690)
A set of refactoring changes to slighly improve the performance of generic dictionary access on R2R images, and simplifying the codebase:
1) Removing dependency on CEEInfo::ComputeRuntimeLookupForSharedGenericTokenStatic (and deleting the API).
2) Stop parsing the generic type/method signatures when generating the R2R dictionary lookup assembly stub.
3) Avoid re-encoding the generic type/method signatures in a new in-memory blob using a SigBuilder (signatures used directly from the R2R image)
4) Moved the parsing/loading of type/method signatures to Dictionary::PopulateEntry()
5) Dictionary index and slot number are now encoded in the generated assembly stub instead of the signature (stub takes a pointer to a data blob, which contains the signature, the dictionary index and slot, and the module pointer)
Diffstat (limited to 'src/vm/codeman.cpp')
-rw-r--r-- | src/vm/codeman.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/vm/codeman.cpp b/src/vm/codeman.cpp index 701f5da392..7eea254646 100644 --- a/src/vm/codeman.cpp +++ b/src/vm/codeman.cpp @@ -4535,6 +4535,40 @@ PTR_Module ExecutionManager::FindZapModule(TADDR currentData) } /* static */ +PTR_Module ExecutionManager::FindReadyToRunModule(TADDR currentData) +{ + CONTRACTL + { + NOTHROW; + GC_NOTRIGGER; + SO_TOLERANT; + MODE_ANY; + STATIC_CONTRACT_HOST_CALLS; + SUPPORTS_DAC; + } + CONTRACTL_END; + +#ifdef FEATURE_READYTORUN + ReaderLockHolder rlh; + + RangeSection * pRS = GetRangeSection(currentData); + if (pRS == NULL) + return NULL; + + if (pRS->flags & RangeSection::RANGE_SECTION_CODEHEAP) + return NULL; + + if (pRS->flags & RangeSection::RANGE_SECTION_READYTORUN) + return dac_cast<PTR_Module>(pRS->pHeapListOrZapModule);; + + return NULL; +#else + return NULL; +#endif +} + + +/* static */ PTR_Module ExecutionManager::FindModuleForGCRefMap(TADDR currentData) { CONTRACTL |