Skip to content

JIT: treat synthesized profile data as pgo data, fix finally weights #83185

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

Merged
merged 3 commits into from
Mar 9, 2023

Conversation

AndyAyersMS
Copy link
Member

@AndyAyersMS AndyAyersMS commented Mar 9, 2023

Once synthesis arrives on the scene, we're not going to want phases in the JIT arbitrarily modifying block weights. There is already a guard of this sort for regular profile data, so it makes sense to extend that to synthesized data as well.

When synthesizing counts, propagate counts to finallies from the associated trys. This needs to be done carefully as we have make sure not to visit the finally until the count in the try is set. We rely on some of the properties of DFS pre and post number bracketing to do this efficiently, without needing to track extra state.

Contributes to #82964.

…ropagation

Once synthesis arrives on the scene, we're not going to want phases in the JIT
to arbitrarily modifing block weights. There is already a guard of this sort
for regular profile data, so it makes sense to extend that to synthesized data
as well.

When synthesizing counts, propagate counts to finallies from the associated
trys. This needs to be done carefully as we have make sure not to visit the
finally until the count in the try is set. We rely on some of the properties
of DFS pre and post number bracketing to do this efficiently, without needing
to track extra state.

Contributes to dotnet#82964.
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 9, 2023
@ghost ghost assigned AndyAyersMS Mar 9, 2023
@ghost
Copy link

ghost commented Mar 9, 2023

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

Issue Details

Once synthesis arrives on the scene, we're not going to want phases in the JIT to arbitrarily modifing block weights. There is already a guard of this sort for regular profile data, so it makes sense to extend that to synthesized data as well.

When synthesizing counts, propagate counts to finallies from the associated trys. This needs to be done carefully as we have make sure not to visit the finally until the count in the try is set. We rely on some of the properties of DFS pre and post number bracketing to do this efficiently, without needing to track extra state.

Contributes to #82964.

Author: AndyAyersMS
Assignees: -
Labels:

area-CodeGen-coreclr

Milestone: -

@AndyAyersMS
Copy link
Member Author

AndyAyersMS commented Mar 9, 2023

@BruceForstall PTAL
cc @dotnet/jit-contrib

Should be no diff though one of my local SPMI runs hit a "general fatal error" -- looks like it was in post-processing though.

[20:00:59] Running asm diffs of d:\spmi\mch\b0e1ce41-2339-491d-ab72-736a8d233ea1.windows.x64\coreclr_tests.run.windows.x64.checked.mch
[20:01:00] General fatal error

@AndyAyersMS
Copy link
Member Author

SPMI replay timed out.

@AndyAyersMS AndyAyersMS merged commit e0e8078 into dotnet:main Mar 9, 2023
@AndyAyersMS AndyAyersMS mentioned this pull request Mar 10, 2023
21 tasks
@ghost ghost locked as resolved and limited conversation to collaborators Apr 9, 2023
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