[browser][CoreCLR] Resolve ReadyToRun addresses for EventPipe - #134026
Merged
Merged
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
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. |
Contributor
|
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara |
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Fix the EventPipe contract boundary and guard the ReadyToRun assertion for CoreCLR-only runs.
Get a fresh assessment by requesting another Copilot review.
Review tier: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes WASM EventPipe ReadyToRun address and symbol resolution.
Changes:
- Maps R2R function-table indices to synthetic virtual IPs.
- Extends diagnostics coverage for
System.Buffer.Memmove. - Removes the prior CoreCLR issue suppression.
| File | Summary |
|---|---|
src/mono/wasm/Wasm.Build.Tests/Blazor/EventPipeDiagnosticsTests.cs |
Adds ReadyToRun symbol validation. |
src/coreclr/vm/eventtrace.cpp |
Resolves WASM R2R entry points for EventPipe. |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
pavelsavara
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fix EventPipe method load, rundown, and IL-to-native-map resolution for ReadyToRun methods on CoreCLR browser-Wasm.
On
TARGET_WASMwithFEATURE_PORTABLE_ENTRYPOINTS,ReadyToRunInfo::GetEntryPointpublishes a callablePortableEntryPointwhose actual code is a global Wasm function-table index. The correspondingMethodDescandReadyToRunJitManagerrange are registered under a synthetic virtual IP. EventPipe previously passed the portable-entrypoint address toEECodeInfo, which could not resolve it throughExecutionManager; the existingEECodeInfo::IsValidguard then omitted the R2R method event.MethodAndStartAddressToEECodeInfoPointernow preserves interpreter resolution first, then translates a native Wasm portable entrypoint's function-table index throughExecutionManager::GetWasmVirtualIPFromFunctionTableIndex. Keeping the conversion in the shared EventPipe helper covers both method events and IL-to-native-map events. The existing mapping also preserves controlling-method behavior for funclet indices.Non-Wasm behavior, explicit JIT code addresses, interpreter bytecode addresses, generic method handling, and the
EECodeInfo::IsValiddefense remain unchanged.The browser CPU-sampling test is re-enabled for CoreCLR and now verifies both:
Counter.IncrementCount; andSystem.Buffer.Memmoveframework method.Validation
./build.sh clr+libs+host./build.sh clrPATH="/opt/homebrew/bin:$PATH" ./build.sh -os browser -arch wasm -c Release -subset clr+libs -cmakeargs "-DCMAKE_CXX_FLAGS=-Wno-error=unguarded-availability-new"pipe2availability diagnostic in the host-side universal-Wasm JIT build.Wasm.Build.Tests.Blazor.EventPipeDiagnosticsTestson CoreCLR browser-Wasm, workload lane: 4 passed, 0 failed, 0 skipped (metrics, heap dump, and CPU samples in Debug and Release).A mutation attempt that removed only the address conversion could not provide trustworthy red evidence because the local workload installation cached a runtime pack with the same package version. The final fixed browser runtime and strengthened end-to-end tests were rebuilt and rerun successfully.
Resolves #132410
Note
This pull request description was generated with the assistance of GitHub Copilot.