-
Notifications
You must be signed in to change notification settings - Fork 5.2k
JIT: fix regressions from inlining policy change #117492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Don't boost the IL size threshold at Tier1+Instr, since this can cause us to lose profile data for key inlinees. Fixes most of the regressions from dotnet#115904
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refines the inlining policy by disabling the IL size boost when running at Tier1 with instrumentation, preventing loss of profile data for critical inlinees.
- Added a check for
opts.IsInstrumentedAndOptimized()
to skip raisingmaxCodeSize
in Tier1+Instr modes. - Updated the JITDUMP message to reflect when the boost is suppressed.
Comments suppressed due to low confidence (1)
src/coreclr/jit/inlinepolicy.cpp:1386
- Add or update unit tests for the instrumented+optimized scenario to verify that maxCodeSize is not boosted as intended.
if (!isTier1Instr)
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
@EgorBo PTAL Tier1+Instr has to balance perf vs degree of instrumentation: If we inline more we get better Tier1+Instr perf, but we may lose Tier1 perf. This PR returns us to the level we were at before #115119 and should fix many of the regressions reported in #115904. Arguably we should be even less aggressive in Tier1+Instr (one way to see this is to look at the gap in perf between default and R2R disabled). Someday we'll fix #44372 and we can revisit all this with fewer compromises. |
@EgorBot --filter "System.Globalization.Tests.StringEquality.Compare_DifferentFirstChar*" |
Don't boost the IL size threshold at Tier1+Instr, since this can cause us to lose profile data for key inlinees.
Fixes most of the regressions from #115904