-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Stop passing StandardOptimizationData.mibc to crossgen2 multiple times for SPC #67458
Conversation
Tagging subscribers to this area: @JulieLeeMSFT Issue DetailsWhen invoking crossgen2 we are currently passing the mibc file 4 times, once for each scenario we have PGO data for. It means that the counts the JIT sees for SPC are inflated by 4x. Note that we are using raw counts in the JIT that might be affected by this change: runtime/src/coreclr/jit/fgprofile.cpp Lines 50 to 73 in 063d080
However it is not right to multiply this value by 0.25x either as I believe for other framework DLLs we are passing StandardOptimizationData.mibc just once. So I am hoping to see if this has ill effects on SPC from the perf legs. @EgorBo's original PR #55096 already has data showing that most hot methods have more than 5000 counts, so hopefully we will not see anything too bad. cc @dotnet/jit-contrib @davidwrighton
|
I've checked locally this reduces R2R'd corelib size from |
The build failure seems to be because the .mibc file does not exist there, and the build previously did not have any files in
|
Also cc @dotnet/source-build-contrib, is it expected that we are not passing PGO data in the SourceBuild pipeline? |
Yes, the PGO data is considered a prebuilt binary that isn't allowed to be used in the open-source builds. We've talked about ways around this but haven't had the resources to really fix it yet. |
Failure is #58927 |
When invoking crossgen2 we are currently passing the mibc file 4 times, once for each scenario we have PGO data for. It means that the counts the JIT sees for SPC are inflated by 4x.
Note that we are using raw counts in the JIT that might be affected by this change:
runtime/src/coreclr/jit/fgprofile.cpp
Lines 50 to 73 in 063d080
However it is not right to multiply this value by 0.25x either as I believe for other framework DLLs we are passing StandardOptimizationData.mibc just once. So I am hoping to see if this has ill effects on SPC from the perf legs. @EgorBo's original PR #55096 already has data showing that most hot methods have more than 5000 counts, so hopefully we will not see anything too bad.
cc @dotnet/jit-contrib @davidwrighton