-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Clean up crossgen related build scripts also generate native symbols for R2R images #16297
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
For profiling other scenarios users can set .Net environment variable DOTNET_TieredCompilation = 0 |
|
Could you please see search results https://github.com/PowerShell/PowerShell/search?l=PowerShell&q=Crossgen I see more files with |
TravisEz13
left a comment
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.
Should we take this for 7.2?
|
@daxian-dbw Can we do a quick startup perf check before and after the change? |
|
OK, will do so. |
|
I don't see a noticeable difference on both Windows and Linux with or without this change.
|
|
🎉 Handy links: |
|
🎉 Handy links: |
…s for `R2R` images (PowerShell#16297) * Clean up crossgen related build scripts * Fix ci.psm1 * Clean up '-CrossGen' use in a few other files
…s for `R2R` images (PowerShell#16297) * Clean up crossgen related build scripts * Fix ci.psm1 * Clean up '-CrossGen' use in a few other files
PR Summary
Supersede #16265
The .NET team has confirmed that ALL .NET 6 runtime assemblies should be R2R images. See dotnet/runtime#60779 for details.
During my verification, I found some runtime assemblies that are not R2R images, but it turns out that is by design because those assemblies as pure façade assemblies. See dotnet/runtime#60782 for details.
I have also verified that
<PublishReadyToRun>true</PublishReadyToRun>actually crossgen'ed all the package assemblies pwsh depends on, including all that in the $commonAssembliesForAddType array today. The following is the pdb generated for those crossgen'ed assemblies.Given all above, we should just remove the
Start-CrossGencode, and also remove the-CrossGenswitch parameter fromStart-PSBuild, because we have<PublishReadyToRun Condition=" '$(Configuration)' != 'Debug' ">true</PublishReadyToRun>inPowerShell.Common.propsfile, so unless explicitly disabling R2R (forfxdependent*andminSizepackages), our build will generate R2R images for release builds.Also add
<PublishReadyToRunEmitSymbols>true</PublishReadyToRunEmitSymbols>to generate the native symbols for the R2R images when publishing R2R, because profiler needs the symbols generated by<PublishReadyToRunEmitSymbols>to examine the R2R files. However, those symbols are only useful for profiling the startup scenario of PowerShell because PowerShell enables tiered compilation which will overwrite the R2R code.PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.