diff options
author | Koundinya Veluri <kouvel@users.noreply.github.com> | 2018-01-25 12:01:32 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-25 12:01:32 -0800 |
commit | 209415618ca5d1a5d1d9e39ca78d643d0935534e (patch) | |
tree | d83c946783390afbb52e3e0f968018c38dfd2560 /src/vm/callcounter.cpp | |
parent | e9985126acb0f1efd7c780faac4e66bc798b73c0 (diff) | |
download | coreclr-209415618ca5d1a5d1d9e39ca78d643d0935534e.tar.gz coreclr-209415618ca5d1a5d1d9e39ca78d643d0935534e.tar.bz2 coreclr-209415618ca5d1a5d1d9e39ca78d643d0935534e.zip |
Enable tiered jitting for R2R methods (#15967)
Enable tiered jitting for R2R methods
- Included R2R methods and generics over value types in CoreLib for tiered jitting. Tier 0 for R2R methods is the precompiled code if available, and tier 1 is selectively scheduled based on call counting.
- Added a delay before starting to count calls for tier 1 promotion. The delay is a short duration after frequent tier 0 jitting stops (current heuristic for identifying startup).
- Startup time and steady-state performance have improved on JitBench. There is a regression shortly following startup due to call counting and tier 1 jitting, for a short duration before steady-state performance stabilizes.
- Added two new config values, one for configuring the call count threshold for promoting to tier 1, and another for specifying the delay from the last tier 0 JIT invocation before starting to count calls
Diffstat (limited to 'src/vm/callcounter.cpp')
-rw-r--r-- | src/vm/callcounter.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/vm/callcounter.cpp b/src/vm/callcounter.cpp index 14d9e6e6a4..641b61198a 100644 --- a/src/vm/callcounter.cpp +++ b/src/vm/callcounter.cpp @@ -32,11 +32,18 @@ CallCounter::CallCounter() // Returns TRUE if no future invocations are needed (we reached the count we cared about) // and FALSE otherwise. It is permissible to keep calling even when TRUE was previously // returned and multi-threaded race conditions will surely cause this to occur. -BOOL CallCounter::OnMethodCalled(MethodDesc* pMethodDesc) +void CallCounter::OnMethodCalled( + MethodDesc* pMethodDesc, + TieredCompilationManager *pTieredCompilationManager, + BOOL* shouldStopCountingCallsRef, + BOOL* wasPromotedToTier1Ref) { STANDARD_VM_CONTRACT; _ASSERTE(pMethodDesc->IsEligibleForTieredCompilation()); + _ASSERTE(pTieredCompilationManager != nullptr); + _ASSERTE(shouldStopCountingCallsRef != nullptr); + _ASSERTE(wasPromotedToTier1Ref != nullptr); // PERF: This as a simple to implement, but not so performant, call counter // Currently this is only called until we reach a fixed call count and then @@ -75,7 +82,7 @@ BOOL CallCounter::OnMethodCalled(MethodDesc* pMethodDesc) } } - return GetAppDomain()->GetTieredCompilationManager()->OnMethodCalled(pMethodDesc, callCount); + pTieredCompilationManager->OnMethodCalled(pMethodDesc, callCount, shouldStopCountingCallsRef, wasPromotedToTier1Ref); } #endif // FEATURE_TIERED_COMPILATION |