You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WASM JIT: profiler ELT (enter/leave/tailcall) hooks are not implemented #130953
The experimental WASM JIT (clrjit_universal_wasm) does not implement profiler ELT (enter/leave/tailcall) hook codegen. Today this is asymmetric and inconsistent:
Enter hook: the genProfilingEnterCallback call in genFnProlog is fully compiled out for WASM (codegencommon.cpp, #if !TARGET_WASM), so WASM never emits the enter hook.
Leave / tailcall hooks: genReturn (codegencommon.cpp:7438) and genJmpPlaceArgs (codegencommon.cpp:7949) still call genProfilingLeaveCallback whenever compIsProfilerHookNeeded(), and the WASM implementation is a bare NYI_WASM("genProfilingLeaveCallback") (codegenwasm.cpp).
So when the runtime requests ELT profiling, a WASM method emits a leave hook with no matching enter hook and asserts.
Scope
This issue tracks implementing real profiler ELT hook codegen for WASM: emitting the enter/leave/tailcall helper calls (CORINFO_HELP_PROF_FCN_ENTER / _LEAVE / _TAILCALL) with the appropriate WASM calling sequence and frame/argument setup.
An interim change makes the leave/tailcall path a no-op on WASM (matching the already-skipped enter side) so WASM is internally consistent — no ELT hooks emitted — instead of emitting half of them and asserting. That unblocks measurement but does not provide working profiler ELT on WASM; this issue tracks the real implementation.
Impact
In an SPMI replay of the WASM altjit over libraries_tests_no_tiered_compilation + coreclr_tests, the leave-callback stub accounts for ~1,522 asserting contexts.
Note
This issue was authored with the assistance of GitHub Copilot.
Activity
dotnet-policy-service commentedon Jul 17, 2026
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.
tannergooding commentedon Jul 17, 2026
CC. @adamperlin, @lewing
dotnet-policy-service commentedon Jul 17, 2026
Tagging subscribers to 'arch-wasm': @lewing, @pavelsavara
See info in area-owners.md if you want to be subscribed.
JulieLeeMSFT commentedon Jul 17, 2026
CC @dotnet/wasm-contrib.
tannergooding commentedon Jul 17, 2026
Not sure how important these are, but they cause a large number of SPMI contexts to fail which hurt the ability to get SuperPMI diffs
Skip profiler leave callback on wasm instead of asserting (#130955)
AndyAyersMS commentedon Jul 17, 2026
JIT only, not R2R. Not a .NET 11 thing.