From fd1998903d5eef356f27c54e5a9d490711cbc9e7 Mon Sep 17 00:00:00 2001 From: noahfalk Date: Mon, 24 Jul 2017 17:38:30 -0700 Subject: 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. --- src/vm/callcounter.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'src/vm/callcounter.cpp') 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 -- cgit v1.2.3