Apply tiering's call counting delay more broadly (dotnet/coreclr#18610)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Tue, 17 Jul 2018 05:04:07 +0000 (22:04 -0700)
committerGitHub <noreply@github.com>
Tue, 17 Jul 2018 05:04:07 +0000 (22:04 -0700)
commitbec3f3ad897a3345b9e49dadaf67c0be51b52286
tree28126a4249904877ddf9d260e527638050669fda
parentaf06645d6e8766991428c123a15c555f8c06d6fe
Apply tiering's call counting delay more broadly (dotnet/coreclr#18610)

Apply tiering's call counting delay more broadly

Issues
- When some time passes between process startup and first significant use of the app, startup perf with tiering can be slower because the call counting delay is no longer in effect
- This is especially true when the process is affinitized to one cpu

Fixes
- Initiate and prolong the call counting delay upon tier 0 activity (jitting or r2r code lookup for a new method)
- Stop call counting for a called method when the delay is in effect
- Stop (and don't start) tier 1 jitting when the delay is in effect
- After the delay resume call counting and tier 1 jitting
- If the process is affinitized to one cpu at process startup, multiply the delay by 10

No change in benchmarks.

Commit migrated from https://github.com/dotnet/coreclr/commit/6b403ca4422f2bf3df9d25a32790cc4c0d4b6ee4
src/coreclr/src/inc/CrstTypes.def
src/coreclr/src/inc/clrconfigvalues.h
src/coreclr/src/inc/crsttypes.h
src/coreclr/src/inc/utilcode.h
src/coreclr/src/utilcode/util.cpp
src/coreclr/src/vm/ceemain.cpp
src/coreclr/src/vm/eeconfig.cpp
src/coreclr/src/vm/prestub.cpp
src/coreclr/src/vm/tieredcompilation.cpp
src/coreclr/src/vm/tieredcompilation.h