Repository navigation
[browser][coreclr] Add prelinked native runtime flavors - #137014
pavelsavara wants to merge 14 commits into
Conversation
Split EventPipe into enabled and disabled static components for browser CoreCLR, build production and diagnostics native asset sets, and select the matching prelink without requiring wasm-tools. Co-authored-by: Copilot <[email protected]>
…-coreclr-native-flavors
|
Azure Pipelines: Successfully started running 4 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Co-authored-by: Copilot <[email protected]>
Stage diagnostics assets in the live runtime pack, replace stale prelinked assets when switching between build and publish, and compare WBT output against the effective flavor. Co-authored-by: Copilot <[email protected]>
|
As part of this, would it be reasonable to re-trim System.Private.CoreLib with the corresponding feature flags set (ie if there's no EventPipe, all EventSource logic is no-op, similar for debugger) so we can regenerate the QCall/FCall/Runtime-entrypoint table and trim out more native code? |
Co-authored-by: Copilot <[email protected]>
Match the Browser library-test native flavor to EventSourceSupport and use the regular QCall contract for disabled EventPipe entry points. Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Do not relink solely to enable diagnostics. Stage prelinked publish assets per project so multiple clients can share a runtime pack without colliding in static web asset compression. Follow-up for #137014. Co-authored-by: Copilot <[email protected]>
Distinguish a disabled EventPipe component from native provider allocation failure so production prelinks can deliver both manifest and dynamic events to managed listeners. Co-authored-by: Copilot <[email protected]>
Replace an existing build-time symbol map alongside the native Wasm and JavaScript when publish selects a different prelink, including publish --no-build. Co-authored-by: Copilot <[email protected]>
Regenerate the disabled EventPipe stub when its shared Python generator changes. Co-authored-by: Copilot <[email protected]>
Keep workload-backed coverage aligned with prelink selection: enabling diagnostics alone does not require a native relink. Co-authored-by: Copilot <[email protected]>
Yes, I will do follow-up #137440 |
Summary
EnableDiagnosticstaking precedenceThe common VM remains layout-compatible by keeping
FEATURE_PERFTRACINGenabled. Browser builds move EventPipe and diagnostic-server operations behind an out-of-line adapter contract, then link exactly one oflibeventpipe-enabled.aorlibeventpipe-disabled.a. Non-Browser CoreCLR targets retain their existing inline path.The production native asset set remains in the normal runtime-pack location. The diagnostics alternative is packaged under
data/native-flavors/diagnostics, avoiding duplicate NuGet runtime-asset basenames.Release size
dotnet.native.wasmrawdotnet.native.wasmBrotliShipping the diagnostics trio and enabled component in addition to production adds 7,886,855 raw bytes, or 2,934,854 bytes after nupkg compression.
Validation
Passed on the exact merged PR head:
.\build.cmd -bl -os browser -subset clr+libs+host -c Debug /p:RuntimeFlavor=CoreCLR /p:EnableHotReloadInRuntimeConfigDevFile=false— 0 warnings, 0 errors.\build.cmd -bl -os browser -subset clr+libs+host -c Release /p:RuntimeFlavor=CoreCLR /p:EnableHotReloadInRuntimeConfigDevFile=false— 0 warnings, 0 errors.\artifacts\bin\dotnet-none\dotnet.exe build -bl:artifacts\draft-pr-selection-tests-3.binlog -p:TargetOS=browser -p:TargetArchitecture=wasm -p:RuntimeFlavor=CoreCLR -c Debug -t:Test .\src\mono\wasm\Wasm.Build.Tests\ -p:InstallWorkloadForTesting=false -p:TestUsingWorkloads=false -p:InstallChromeForTests=false -p:XUnitMethodName=Wasm.Build.Tests.Blazor.WorkloadRequiredTests.CoreClrPrelinkedNativeFlavorIsSelectedWithoutWorkload— 4 passed in Chrome, 0 failed, 0 skipped.\artifacts\bin\dotnet-none\dotnet.exe build -bl:artifacts\draft-pr-eventpipe-tests.binlog -p:TargetOS=browser -p:TargetArchitecture=wasm -p:RuntimeFlavor=CoreCLR -c Debug -t:Test .\src\mono\wasm\Wasm.Build.Tests\ -p:InstallWorkloadForTesting=false -p:TestUsingWorkloads=false -p:InstallChromeForTests=false -p:XUnitMethodName=Wasm.Build.Tests.Blazor.EventPipeDiagnosticsTests.BlazorEventPipeTestWithCpuSamplesPrelinked— Debug and Release cases passed in Chrome, 0 failed, 0 skippedgit diff --checkand Python generator syntax validationFollow-ups
InitializeDebuggerandCorDBGetInterface).Part of #132772
Note
This pull request description was generated with GitHub Copilot.