Skip to content

Commit d4f78ae

Browse files
committed
Disable tiered compilation for MethodDescs with m_interpreterCode populated
1 parent cdfaf3a commit d4f78ae

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/coreclr/vm/method.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2231,6 +2231,10 @@ class PrepareCodeConfig
22312231
bool ShouldCountCalls() const
22322232
{
22332233
WRAPPER_NO_CONTRACT;
2234+
#ifdef FEATURE_INTERPRETER
2235+
if (m_pMethodDesc->GetInterpreterCode())
2236+
return false;
2237+
#endif
22342238
return m_shouldCountCalls;
22352239
}
22362240

src/coreclr/vm/method.inl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ inline bool MethodDesc::IsEligibleForTieredCompilation()
1919
inline bool MethodDesc::IsEligibleForTieredCompilation_NoCheckMethodDescChunk()
2020
{
2121
LIMITED_METHOD_DAC_CONTRACT;
22+
#ifndef DACCESS_COMPILE
23+
#ifdef FEATURE_INTERPRETER
24+
if (m_interpreterCode)
25+
return false;
26+
#endif
27+
#endif
2228

2329
// Just like above, but without the assert. This is used in the path which initializes the flag.
2430
#ifdef FEATURE_TIERED_COMPILATION

0 commit comments

Comments
 (0)