Uh oh!
There was an error while loading. Please reload this page.
Deduplicate LSDA data in the object writer - #97972
Conversation
Extracting a piece of dotnet#87045 that I had to revert in that PR. Native linkers don't like when LSDA is in a COMDAT so fold these in the object writer instead. Seems to save about 1.2% in the Stage1 app. Obviously Unix only.
ghost
commented
Feb 5, 2024
Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas Issue DetailsExtracting a piece of #87045 that I had to revert in that PR. Native linkers don't like when LSDA is in a COMDAT so fold these in the object writer instead. Seems to save about 1.2% in the Stage1 app. Obviously Unix only. I only tested it with the Stage1 app so opening as draft so that I don't embarrass myself if the CI is all red.
|
| if (emittedLsdaSymbols == null) | ||
| EmitLsda(nodeWithCodeInfo, frameInfos, i, _lsdaSectionWriter, ref mainLsdaOffset); |
There was a problem hiding this comment.
This can be folded into the previous if on line 217. It was originally split to support prepending additional data in the LSDA section but that's solved in a different way for ARM32 now.
MichalStrehovsky
commented
Feb 5, 2024
@filipnavara what's the preferred way to exclude this for Mach-O? Mach-O seems to have opinions (or bugs) about this so I'd disable this there. |
MichalStrehovsky
commented
Feb 5, 2024
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
filipnavara
commented
Feb 5, 2024
No strong preferences. I would probably use the same pattern as |
MichalStrehovsky
commented
Feb 6, 2024
From a quick look at https://opensource.apple.com/source/ld64/ld64-609/src/ld/parsers/macho_relocatable_file.cpp and the assert in question (
|
MichalStrehovsky
commented
Feb 6, 2024
/azp run runtime-nativeaot-outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
am11
commented
Feb 6, 2024
👍
|
filipnavara
commented
Feb 6, 2024
It’s hard to separate noise and improvements on this. There’s a dashboard that tracks it over time - https://aka.ms/aspnet/nativeaot/benchmarks - and possibly a system that auto-files issues on large changes. |
MichalStrehovsky
commented
Feb 6, 2024
We have a "is size in range" test that has a big range that prevents the most egregious regressions (like if someone drags in the reflection stack into a hello world): runtime/src/tests/nativeaot/SmokeTests/HardwareIntrinsics/Program.cs Lines 17 to 31 in 85b5eab And like Filip said, the rest is checked elsewhere. |
eerhardt
commented
Feb 8, 2024
I can confirm we are seeing 1.3% and 1.7% size on disk reduction in Stage1 and Stage2 AOT apps in our benchmarks. (3% if you include symbol size). dotnet/aspnetcore#53906 |
Extracting a piece of #87045 that I had to revert in that PR. Native linkers don't like when LSDA is in a COMDAT so fold these in the object writer instead. Seems to save about 1.2% in the Stage1 app. Obviously Unix only.
Cc @dotnet/ilc-contrib