diff options
author | noahfalk <noahfalk@microsoft.com> | 2017-07-24 17:38:30 -0700 |
---|---|---|
committer | noahfalk <noahfalk@microsoft.com> | 2017-07-24 17:38:30 -0700 |
commit | fd1998903d5eef356f27c54e5a9d490711cbc9e7 (patch) | |
tree | b1d3d7ff1978483060a0f7c879b22006edd417b4 /src/vm/callcounter.cpp | |
parent | 39cd3cfcb078154f9b595ae476f2c5fb7b445e18 (diff) | |
download | coreclr-fd1998903d5eef356f27c54e5a9d490711cbc9e7.tar.gz coreclr-fd1998903d5eef356f27c54e5a9d490711cbc9e7.tar.bz2 coreclr-fd1998903d5eef356f27c54e5a9d490711cbc9e7.zip |
Add the runtime code versioning feature
This makes tiered compilation work properly with profiler ReJIT, and positions the runtime to integrate other versioning related features together in the future. See the newly added code-versioning design-doc in this commit for more information.
Breaking changes for profilers: See code-versioning-profiler-breaking-changes.md for more details.
Diffstat (limited to 'src/vm/callcounter.cpp')
-rw-r--r-- | src/vm/callcounter.cpp | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/src/vm/callcounter.cpp b/src/vm/callcounter.cpp index 90013c79fb..14d9e6e6a4 100644 --- a/src/vm/callcounter.cpp +++ b/src/vm/callcounter.cpp @@ -23,23 +23,6 @@ CallCounter::CallCounter() m_lock.Init(LOCK_TYPE_DEFAULT); } -// Init our connection to the tiered compilation manager during -// AppDomain startup. This pointer will remain valid for the lifetime -// of the AppDomain. -void CallCounter::SetTieredCompilationManager(TieredCompilationManager* pTieredCompilationManager) -{ - CONTRACTL - { - NOTHROW; - GC_NOTRIGGER; - CAN_TAKE_LOCK; - MODE_PREEMPTIVE; - } - CONTRACTL_END; - - m_pTieredCompilationManager.Store(pTieredCompilationManager); -} - // This is called by the prestub each time the method is invoked in a particular // AppDomain (the AppDomain for which AppDomain.GetCallCounter() == this). These // calls continue until we backpatch the prestub to avoid future calls. This allows @@ -92,7 +75,7 @@ BOOL CallCounter::OnMethodCalled(MethodDesc* pMethodDesc) } } - return m_pTieredCompilationManager.Load()->OnMethodCalled(pMethodDesc, callCount); + return GetAppDomain()->GetTieredCompilationManager()->OnMethodCalled(pMethodDesc, callCount); } #endif // FEATURE_TIERED_COMPILATION |