Open EgorBo opened 2 years ago
@EgorBo, this issue is tagged for 8. Assume its not a large change to make it in?
@EgorBo, this issue is tagged for 8. Assume its not a large change to make it in?
The fix is more or less simple but I wasn't able yet to proove it improves anything yet, need to try to some big 1P project
I moved it to Future but as a best-effort to make it to 8.0 if we find a proof it works
When we re-jit a R2R'd code we hit
HandleCallCountingForFirstCall
where we setm_tier1CallCountingCandidateMethodRecentlyRecorded = true
to delay call-counting installation further, see here.It seems to me that we should not do that when we already have R2R'd version installed, a proper fix is
However,
ExecutionManager::IsReadyToRunCode
is likely not cheap due to https://github.com/dotnet/runtime/issues/8393 issue 😞The problem, it should help with, is: when we start a large app we constantly compile something and VM simply doesn't have a window to install call counting stubs for methods, even extremely hot ones - they might stuck un-counted in Tier0 for seconds, see https://github.com/dotnet/runtime/pull/70941#issuecomment-1284348407