Repository navigation
[release/11.0.1xx] [tools] Skip scanning the platform assembly in the InlineDlfcnMethods step. - #26820
Conversation
When Hot Reload compatibility leaves the platform assembly untrimmed, the assembly preparer cannot rewrite it. The Dlfcn symbols collected during that pass are discarded; post-processing collects the surviving native symbol references independently. Skip the otherwise costly scan only for that assembly and action.\n\nKeep scanning linked platform assemblies and assemblies in non-Hot-Reload builds. Add regression tests for both preserved paths and for user-assembly symbols, and document why this preparation-pass exception is safe. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: f3637ab8-80a2-44df-9ecc-97ddf253d54d
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused backport preserves required paths and includes appropriate regression coverage.
Review effort: Balanced
Findings: None
What changed in this PR
Backports a performance optimization that skips unnecessary platform-assembly scanning during Hot Reload-compatible preparation.
Changes:
- Skips product assemblies when Dlfcn inlining is disabled.
- Adds regression coverage for skipped and preserved processing paths.
| File | Description |
|---|---|
tools/dotnet-linker/Steps/InlineDlfcnMethodsStep.cs |
Adds the conditional platform-assembly skip. |
tests/assembly-preparer/InlineDlfcnMethodsStepTests.cs |
Verifies symbol collection and inlining behavior. |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #5a7ca52] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 269 tests passed 🎉 Tests counts✅ assembly-processing: All 1 tests passed. Html Report (VSDrops) Download macOS tests✅ Tests on macOS Sonoma (14): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
When the InlineDlfcnMethodsStep is only collecting information, and not inlining anything, the step doesn't find any information we need from the platform assembly, so just skip processing the platform assembly in this scenario.
Add regression tests for both preserved paths and for continued user-assembly symbol collection.
In a forced preparation pass of a MAUI iOS simulator app, InlineDlfcnMethodsStep fell from 2.393 seconds in the original binlog to 0.0013 seconds after the change.
🤖 Pull request created by Copilot
Backport of #26786.