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

Stop ngening compat-only DLLs in subfolders #11181

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rainersigwald
Copy link
Member

These DLLs are shipped to these subfolders only for compat with applications that load from them naïvely; MSBuild.exe and VS and applications that use MSBuildLocator should only ever load them from the bin\ directory directly. So stop spending time ngening them.

Notes to January self: look at ngen logs in VS perf tests. Verify

  • no methodsJitted regressions
  • we are actually not ngening these files for x86 or amd64

These DLLs are shipped to these subfolders only for compat with
applications that load from them naïvely; MSBuild.exe and VS and
applications that use MSBuildLocator should only ever load them from the
`bin\` directory directly. So stop spending time ngening them.
Copy link
Contributor

Hello @rainersigwald, I noticed that you’re changing an .swr file or any file under src/Package/MSBuild.VSSetup.. Please make sure to validate this change by an experimental VS insertion. This is accomplished by pushing to an exp/* branch, which requires write permissions to this repo.

@rainersigwald rainersigwald self-assigned this Dec 20, 2024
@rainersigwald
Copy link
Member Author

Experimental insertion results on this one are weirder: https://dev.azure.com/devdiv/DevDiv/_git/VS/pullrequest/599728.

Specifically there seems to be a consistent regression that Common7\IDE\PublicAssemblies\Microsoft.IO.Redist.dll is in VM_AdjustedImagesInMemory_Total_devenv in a few scenarios where it wasn't before. But why?

filtering that metric with "show identical" shows that in both cases it's loading C_\Windows\assembly\NativeImages_64_HASH_\Microsoft.IO.Redist.ni.dll, so it sure looks like it's still getting ngened by whatever puts it in PublicAssemblies . . .

And looking at the ngen64 logs (baseline on the bottom):

rg 'install ".*Microsoft\.IO\.Redist\.dll\"'
ec07b127fa38ea2503e95b117bca1117\TestExecutionOutputs\ManagedLangsVS64.AddNewProject\Warmup-1-20250109-215559_dtl-bienvy1e\NGenLogs\Framework64\ngen.log
1412:01/09/2025 21:07:23.011 [8236]: Executing command from offline queue: install "C:\VisualStudio\MSBuild\Current\Bin\Microsoft.IO.Redist.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\Common7\IDE\vsn.exe" /queue:1
1423:01/09/2025 21:07:23.065 [8236]: Executing command from offline queue: install "C:\VisualStudio\MSBuild\Current\Bin\Microsoft.IO.Redist.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\MSBuild\Current\Bin\MSBuild.exe" /queue:1
1857:01/09/2025 21:07:24.059 [8236]: Executing command from offline queue: install "C:\VisualStudio\Common7\IDE\PublicAssemblies\Microsoft.IO.Redist.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\Common7\IDE\vsn.exe" /queue:3

ccaff841d82a52d8d1308341cd65e0a7\TestExecutionOutputs\ManagedLangsVS64.AddNewProject\Warmup-1-20250109-052236_dtl-juijkiyh\NGenLogs\Framework64\ngen.log
1536:01/09/2025 04:35:42.045 [3496]: Executing command from offline queue: install "C:\VisualStudio\MSBuild\Current\Bin\Microsoft.IO.Redist.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\Common7\IDE\vsn.exe" /queue:1
1593:01/09/2025 04:35:42.303 [3496]: Executing command from offline queue: install "C:\VisualStudio\MSBuild\Current\Bin\Microsoft.IO.Redist.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\MSBuild\Current\Bin\MSBuild.exe" /queue:1
1761:01/09/2025 04:35:42.714 [3496]: Executing command from offline queue: install "C:\VisualStudio\MSBuild\Current\Bin\amd64\Microsoft.IO.Redist.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\Common7\IDE\vsn.exe" /queue:3
1855:01/09/2025 04:35:42.867 [3496]: Executing command from offline queue: install "C:\VisualStudio\Common7\IDE\PublicAssemblies\Microsoft.IO.Redist.dll" /NoDependencies /ExeConfig:"C:\VisualStudio\Common7\IDE\vsn.exe" /queue:3

So . . . it's redundantly ngened still.

@rainersigwald
Copy link
Member Author

Remaining redundancy from that log addressed by #11256.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant