-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Size regression on win-x64 with managed objwriter #96665
Comments
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsOn win-x64, the object size is smaller with managed implementation, but final executable size regresses. > Set-Alias -Name dotnet9 -Value ~/.dotnet9/dotnet
> dotnet9 --version
9.0.100-alpha.1.24059.1
> dotnet9 new webapiaot -n web1
> cd web1
# managed
> dotnet9 publish -c Release -o dist
> wsl du -b dist/web1.exe obj/Release/net9.0/win-x64/native/web1.obj
9504768 dist/web1.exe
51874490 obj/Release/net9.0/win-x64/native/web1.obj
# native
> rm -r -fo obj
> $env:DOTNET_USE_LLVM_OBJWRITER="1"
> dotnet9 publish -c Release -o dist2
> wsl du -b dist2/web1.exe obj/Release/net9.0/win-x64/native/web1.obj
9241088 dist2/web1.exe
55142434 obj/Release/net9.0/win-x64/native/web1.obj
|
cc @filipnavara |
Thanks for filing it. I'll look into it soon. |
Tagging subscribers to 'size-reduction': @eerhardt, @SamMonoRT, @marek-safar Issue DetailsOn win-x64, the object size is smaller with managed implementation, but final executable size regresses. > Set-Alias -Name dotnet9 -Value ~/.dotnet9/dotnet
> dotnet9 --version
9.0.100-alpha.1.24059.1
> dotnet9 new webapiaot -n web1
> cd web1
# managed
> dotnet9 publish -c Release -o dist
> wsl du -b dist/web1.exe obj/Release/net9.0/win-x64/native/web1.obj
9504768 dist/web1.exe
51874490 obj/Release/net9.0/win-x64/native/web1.obj
# native
> rm -r -fo obj
> $env:DOTNET_USE_LLVM_OBJWRITER="1"
> dotnet9 publish -c Release -o dist2
> wsl du -b dist2/web1.exe obj/Release/net9.0/win-x64/native/web1.obj
9241088 dist2/web1.exe
55142434 obj/Release/net9.0/win-x64/native/web1.obj
|
Preliminary examination seems to be that the difference is the .rdata section of the executable. The .rdata sections in the source .obj files have identical size. There's multiple .rdata sections with COMDAT symbols so it's possible that some folding is not taking place while it should. However, the regression is more likely to come from the .xdata (exception data) section which happens to be bigger in the .obj file produced by the managed code. I'll check that. |
On win-x64, the object size is smaller with managed implementation, but final executable size regresses.
The text was updated successfully, but these errors were encountered: