Skip to content

[browser][coreCLR] R2R: Consume the WASM PGO profile in the CoreLib R2R build #132717

Description

@pavelsavara

Part of #130524. Related: #130517, #130521. Depends on the profile-production issue (the optimization.browser-wasm.MIBC.Runtime package).

Goal

Wire the browser-wasm interpreter PGO profile into the WASM CoreLib R2R optimization-data merge, so precompilation uses the interpreter-collected startup hotness.

Why

Once the profile package exists (separate production issue) and WASM CoreLib R2R is enabled (already in progress on a separate branch), the profile still has to be restored and merged into the optimization data the R2R build consumes. Today browser/wasm has no dedicated profile — it falls back to desktop (linux-x64) profiles.

Scope (runtime-side wiring only)

In:

  • Add the optimization.browser-wasm.MIBC.Runtime dependency (eng/Version.Details.xml) + version property (eng/Versions.props).
  • Add a MibcArchitecture="browser/wasm" entry (+ PackageDownload) in eng/restore/optimizationData.targets, so the package restores into artifacts/mibc/browser/wasm/data/ and is merged into StandardOptimizationData.mibc by src/coreclr/crossgen-corelib.proj's existing merge target.
  • Guard with Condition="Exists(...)" so it's a no-op until the package is available.

Out:

  • Producing the package (separate production issue).
  • Enabling R2R for the WASM CoreLib — already in progress on a separate branch. This issue only ensures the WASM profile flows into that merge.

Notes

  • MIBC is architecture-independent; this replaces the desktop-profile fallback for browser/wasm with WASM interpreter-startup-specific data.
  • Do not commit ad-hoc/sample-derived .mibc as optimization data — the profile comes from the package.

Success criteria

  • With the package present, the WASM CoreLib R2R build consumes the merged StandardOptimizationData.mibc including the browser-wasm data, with no changes to the precompilation toolchain.

Open questions

Note

This issue was drafted with GitHub Copilot assistance.

Activity

  1. added this to the 12.0.0 milestone on Aug 24, 2026
  2. self-assigned this
    on Aug 24, 2026
  3. dotnet-policy-service commented on Aug 24, 2026

    @dotnet-policy-service
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

  • Status
    No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions