Fix x86 steady state tiered compilation performance (#17476)
authorNoah Falk <noahfalk@users.noreply.github.com>
Wed, 11 Apr 2018 03:35:33 +0000 (20:35 -0700)
committerGitHub <noreply@github.com>
Wed, 11 Apr 2018 03:35:33 +0000 (20:35 -0700)
commit6854a3ea1f0946a115de208dbb2371896c3ca23a
tree00b5265d1edd7efb60fddfd7656a329318ff8322
parent2ffcdd00249fd37e3c0d823df79ff19579028d66
Fix x86 steady state tiered compilation performance (#17476)

* Fix x86 steady state tiered compilation performance

Also included - a few tiered compilation only test hooks + small logging fix for JitBench

Tiered compilation wasn't correctly implementing the MayHavePrecode and RequiresStableEntryPoint policy functions. On x64 this was a non-issue, but due to compact entrypoints on x86 it lead to methods allocating both FuncPtrStubs and Precodes. The FuncPtrStubs would never get backpatched which caused never ending invocations of the Prestub for some methods. Although such code still runs correctly, it is much slower than it needs to be. On MusicStore x86 I am seeing a 20% improvement in steady state RPS after this fix, bringing us inline with what I've seen on x64.
src/inc/clrconfigvalues.h
src/vm/eeconfig.cpp
src/vm/eeconfig.h
src/vm/method.cpp
src/vm/method.hpp
src/vm/prestub.cpp
src/vm/tieredcompilation.cpp
tests/src/performance/Scenario/JitBench/Runner/Benchmark.cs