Repository navigation
Skip profiler leave callback on wasm instead of asserting - #130955
Merged
Merged
Conversation
genProfilingLeaveCallback was a NYI_WASM stub, so genReturn emits a leave hook with no matching enter hook (the enter callback in genFnProlog is compiled out for wasm via #if !TARGET_WASM). Under the R2R-unsupported diagnostic this flags profiler-leave as an unimplemented oper and rejects those methods. Make the interim behavior explicit: emit nothing, keeping wasm consistently free of ELT hooks until the full feature is implemented (dotnet#130953). Co-authored-by: Copilot App <[email protected]>
|
Azure Pipelines: Successfully started running 5 pipeline(s). 10 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 this area: @JulieLeeMSFT, @jakobbotsch |
Member
Author
|
CC. @adamperlin, @lewing |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR makes the WASM implementation of CodeGen::genProfilingLeaveCallback an explicit no-op (instead of calling NYI_WASM), so WASM codegen doesn’t reject methods due to an unimplemented profiler leave hook.
Changes:
- Replace the
NYI_WASM("genProfilingLeaveCallback")stub in the WASM backend with an explicit no-op and explanatory comment.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/jit/codegenwasm.cpp | Makes genProfilingLeaveCallback on WASM explicitly emit nothing (no NYI_WASM), documenting the intended interim behavior. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
adamperlin
approved these changes
Jul 17, 2026
Member
Author
|
/ba-g unrelated LibraryImport test failure on windows x86 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Turns the
genProfilingLeaveCallbackNYI_WASMstub into an explicit no-op on WASM.genReturnandgenJmpPlaceArgscallgenProfilingLeaveCallbackwhenevercompIsProfilerHookNeeded(), but the matching enter callback ingenFnPrologis compiled out for WASM (#if !TARGET_WASM). So WASM would emit a leave hook with no matching enter hook. In normal buildsNYI_WASMis a no-op, but under theJitWasmNyiToR2RUnsupporteddiagnostic it asserts and flags profiler-leave as an unimplemented oper, rejecting those methods for R2R.This makes the interim behavior explicit and symmetric with the enter side: emit nothing, keeping WASM consistently free of ELT hooks. It is not a working profiler-ELT implementation — the full enter/leave/tailcall codegen for WASM is tracked by #130953.
No behavioral change in normal DEBUG/Release builds (both no-op already); the change only affects the
JitWasmNyiToR2RUnsupporteddiagnostic path.Note
This PR was authored with the assistance of GitHub Copilot.