Skip to content
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

Add .NET Core solution open to OptProf training scenarios #6758

Merged
merged 1 commit into from
Aug 16, 2021

Conversation

ladipro
Copy link
Member

@ladipro ladipro commented Aug 13, 2021

Fixes #6067

Context

There is a few dozen milliseconds worth of avoidable JITting happening in MSBuild assemblies on VS solution open. The respective methods are considered cold and not part of our NGEN images because they are not executed by current training scenarios.

Changes Made

Added an additional scenario to specifically cover .NET Core projects.

Testing

Ran the OptProf pipeline with this change and then Perf.DDRITs with a build optimized using the resulting optimization data.

  • 50 ms less CPU spent JITting Microsoft.Build!*
  • Perf.DDRITs showing improvements:
    • WebToolsVS64.SolutionManagement 0100.Open Solution - devenv methods JITted down by 24.4%
    • WebToolsVS64.SolutionManagement 0200.Rebuild Solution - non-devenv methods JITted down by 4.5%
    • ManagedLangsVS64.RebuildSolution 0100.Rebuild Solution - non-devenv methods JITted down by 12.1%
    • CPlusPlusVS64.SolutionManagement 0300.Change Solution Configuration - Cold - devenv methods JITted down by 2.1%
    • A few RefSet counters improved by a bit as well.
  • Impact on native image size is +490 kB (+4 %).

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see it's called OpenClose test. Do we have a scenario covering a basic build of this project type?

Copy link
Member

@Forgind Forgind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds like a nice win. Is there somewhere I can look at the solution?

@ladipro
Copy link
Member Author

ladipro commented Aug 13, 2021

I see it's called OpenClose test. Do we have a scenario covering a basic build of this project type?

Surprisingly, no. I wasn't able to find one that we could just reference. I think it would make perfect sense to add it as well (under src\Tests\MSBuild in the VS repo, for example). Another potential change I'm tracking is making our assemblies use full (as opposed to partial) NGEN, so even code that's not covered in training scenarios is pre-compiled.

Sounds like a nice win. Is there somewhere I can look at the solution?

Absolutely, the test uses this asset: internal link.

@ladipro ladipro added the merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. label Aug 13, 2021
@rokonec rokonec merged commit cb31444 into main Aug 16, 2021
@ladipro ladipro deleted the exp/optprof-add-core-solution-open-close branch October 25, 2021 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-branch-open PRs that are approved, except that there is a problem that means we are not merging stuff right now. performance
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Expand the MSBuild optprof scenarios to have more representative dotnet/project-system + CPS scenarios
5 participants