-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
JIT: extend initial profile repair to more cases #84741
Conversation
In particular, fill in profiles for cases where we have an incomplete dynamic profile because a method rapidly transitions to OSR, and that method has important code that is not observed to execute by Tier0 instrumentation (things that happen after the OSR triggering loop exits) so having zero profiles for the remainder causes significant perf degradation. Filling in the missing profile data entails: * Allowing repair mode to reset exit likelihoods on zero-weight blocks as well as on inconsistent blocks. Since PGO never saw these blocks run, it has no opinion on their exit likelihoods. * Adjust loop exit edge likelihoods if we end up capping the cyclic probability in the loop, so that some profile weight will exit the loop and light up any previously zero weight blocks that may follow.
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak Issue DetailsIn particular, fill in profiles for cases where we have an incomplete dynamic profile because a method rapidly transitions to OSR, and that method has important code that is not observed to execute by Tier0 instrumentation (things that happen after the OSR triggering loop exits) so having zero profiles for the remainder causes significant perf degradation. Filling in the missing profile data entails:
|
See #84264 (comment) for an example. @EgorBo PTAL Expect some minor diffs but also a few large ones, in particular in |
|
This repair all happens very early before there are any internal blocks. But I would generally expect internal blocks to be able to inherit weights from their surroundings (or if introducing flow, inherit fractions of weights). At some point I will introduce a repair that happens later in the phase pipeline, but that's a ways off. |
Formatting failure looks like some kind of CI glitch. |
Looks like this is hitting other PRs too, opened #84780 |
@AndyAyersMS I'm not sure if that is my PR but I'm seeing asserts in PGO pipelines like this https://helixre107v0xdcypoyl9e7f.blob.core.windows.net/dotnet-runtime-refs-pull-84772-merge-ca986f3aaa67420399/System.Collections.Tests/1/console.b3c01543.log?helixlogtype=result could those be caused by this PR? |
Yes it could very well be -- can you open an issue? |
In particular, fill in profiles for cases where we have an incomplete dynamic profile because a method rapidly transitions to OSR, and that method has important code that is not observed to execute by Tier0 instrumentation (things that happen after the OSR triggering loop exits) so having zero profiles for the remainder causes significant perf degradation.
Filling in the missing profile data entails: