Skip to content

Conversation

AndyAyersMS
Copy link
Member

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

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
@Copilot Copilot AI review requested due to automatic review settings July 10, 2025 01:26
Copy link
Contributor

@Copilot Copilot AI left a 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 raising maxCodeSize 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)

@github-actions github-actions bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 10, 2025
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@AndyAyersMS
Copy link
Member Author

@EgorBo PTAL
cc @dotnet/jit-contrib

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.

@AndyAyersMS
Copy link
Member Author

@EgorBot --filter "System.Globalization.Tests.StringEquality.Compare_DifferentFirstChar*"

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants