Skip to content

[browser][coreclr] Add profile-guided partial ReadyToRun - #134356

Draft
pavelsavara wants to merge 6 commits into
dotnet:mainfrom
pavelsavara:wasm-eager-r2r
Draft

pavelsavara wants to merge 6 commits into
dotnet:mainfrom
pavelsavara:wasm-eager-r2r

Conversation

@pavelsavara

@pavelsavara pavelsavara commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

Summary

  • add WasmReadyToRunProfile for CoreCLR browser applications
  • pass the MIBC profile to crossgen2 and enable partial ReadyToRun compilation
  • leave methods outside the profile available through the interpreter
  • validate missing profile files with an actionable build error
  • invalidate every per-app R2R image when the effective profile or crossgen arguments change
  • document profile compatibility and trimming requirements

Incremental publishing

The effective profile path and crossgen arguments are represented by a stable state hash. When that
state changes, all per-app R2R outputs are removed before crossgen runs. This prevents incremental
publishes from mixing full and partial images, including when switching back to a previously used
configuration.

Validation

  • .\build.cmd -bl -os browser -subset clr+libs+host+packs -c Release /p:RuntimeFlavor=CoreCLR
  • built Microsoft.NETCore.App.Crossgen2.win-x64 for local workload testing
  • WasmReadyToRunProfileControlsPartialAndPgoInput
  • WasmReadyToRunProfileMustExist
  • PublishPartialProfileRunsAllPages
    • full R2R
    • roots-only partial R2R
    • profile-guided partial R2R
    • Chrome execution across all Blazor pages
    • restoration to full R2R

Related to #132717 and #132718.

Note

This pull request description was generated with GitHub Copilot assistance.

@pavelsavara pavelsavara added this to the 12.0.0 milestone Sep 21, 2026
@pavelsavara pavelsavara self-assigned this Sep 21, 2026
@pavelsavara pavelsavara added NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it arch-wasm WebAssembly architecture area-ReadyToRun labels Sep 21, 2026
@pavelsavara
pavelsavara deployed to copilot-pat-pool September 21, 2026 17:27 — with GitHub Actions Active
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @dotnet/crossgen-contrib
See info in area-owners.md if you want to be subscribed.

@pavelsavara
pavelsavara deployed to copilot-pat-pool September 21, 2026 17:28 — with GitHub Actions Active
@pavelsavara

Copy link
Copy Markdown
Member Author
image

Track the effective profile and crossgen state so incremental publishes
rebuild every per-app R2R image when the mode changes. Validate profile
paths, document the supported contract, and cover full/partial
transitions plus browser execution in Wasm.Build.Tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@pavelsavara pavelsavara changed the title [browser] --partial PGO R2R [browser][coreclr] Add profile-guided partial ReadyToRun Oct 1, 2026
pavelsavara and others added 2 commits October 6, 2026 16:28
Restore the browser optimization profile from the transport package and
copy it into the WBT payload instead of committing a binary MIBC file.
Share the same package profile with the JavaScript interop R2R tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This branch was successfully deployed

1 active (outdated) deployment
copilot-pat-pool — edef3f45 Deployed Sep 21, 2026 by pavelsavara via conclusion #8859
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

arch-wasm WebAssembly architecture area-ReadyToRun NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) NO-REVIEW Experimental/testing PR, do NOT review it

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant