Repository navigation
Description
Part of #130524. Related: #130517 (interpreter instrumentation), #130518 (JS capture trigger), #130521 (WASM RyuJIT PGO).
Goal
Turn the WASM interpreter's PGO capability into a maintained optimization-data package — a browser-wasm interpreter-startup profile that flows into the CoreLib R2R build the same way the desktop MIBC packages do today.
Why
The interpreter can produce a block-count profile (#130517) and a developer can capture it from a browser run (#130518). To use that for precompilation in shipping builds, the profile must be collected from a representative workload by CI, packaged, and flowed into the product automatically — not captured by hand.
Scope
In:
- Collection harness (real browser). Run a representative Blazor WASM workload under headless Chrome (Playwright); arm the capture at startup (
DOTNET_DiagnosticPorts=js://pgo, interpreter PGO enabled); drive the in-session stop/flush; capture the downloaded.nettrace. A real-browser profile is required to represent the Blazor WASM product faithfully (a headless-Node in-process capture is a possible lighter-weight fallback). - Convert to
.mibc.dotnet-pgo create-mibc, referencing the IL-trimmed (linked) assemblies whose MVIDs match the trace. ILLink regenerates the module MVID and webcil preserves it, so the untrimmed runtime-pack assemblies will not match — the trimmedlinkedassemblies must be used. - Package as
optimization.browser-wasm.MIBC.Runtimein the .NET optimization-data pipeline, modeled on the existing non-desktop (Android) MIBC path. - Dependency flow. Flow the package version into the product (VMR → runtime) automatically via the standard optimization-data subscription mechanism.
Out: interpreter instrumentation (#130517); the JS trigger (#130518); the runtime-side consumption wiring (separate issue); enabling R2R for the WASM CoreLib.
Direction / notes
- MIBC is IL-level and architecture-independent; the new package adds WASM interpreter-startup-specific data, versus the desktop-workload profiles currently reused for browser/wasm by fallback.
- Model the producer on the existing Android MIBC path (a non-desktop RID MIBC package already collected on an emulator), adapting collection to the browser harness and referencing the wasm
linked(trimmed) assemblies.
Success criteria
- CI produces a browser-wasm profile and publishes
optimization.browser-wasm.MIBC.Runtime. - The package version flows into the product automatically.
- The profile converts and merges via existing tooling with no toolchain changes.
Open questions
- Harness stability/cost in CI (headless Chrome, download capture).
- Which representative workload(s) best reflect startup hotness for the Blazor WASM product.
- Refresh cadence.
- EventPipe provider/keyword selection for the capture.
Note
This issue was drafted with GitHub Copilot assistance.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
dotnet-policy-service commentedon Aug 24, 2026
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.
pavelsavara commentedon Oct 1, 2026
https://dev.azure.com/dnceng/internal/_build/results?buildId=3092837&view=results
[browser][coreclr] Add profile-guided partial ReadyToRun (#134356)
pavelsavara commentedon Nov 4, 2026
#132721