Closed Bug 1805778 Opened 2 years ago Closed 2 years ago

WASM exception handling conflicts with profiler sampling

Categories

(Core :: JavaScript: WebAssembly, enhancement, P5)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: tcampbell, Unassigned)

References

(Blocks 1 open bug)

Details

https://searchfox.org/mozilla-central/rev/2d24d893669ad0fe8d76b0427b25369d35fcc19b/js/src/wasm/WasmBuiltins.cpp#627

The WASM exception handling mechanism uses a special frame pointer value to signal errors. This is only set for a short amount of time, but interferes with profiler stack walking.

I think Jan already looked at refactoring this, but it is a bit awkward. I'm not sure we need to fix this, though we should have this bug recorded as a potential sampler problem.

Severity: -- → N/A

Yury, I think you fixed this in bug 1816000?

Flags: needinfo?(ydelendik)

(In reply to Jan de Mooij [:jandem] from comment #1)

Yury, I think you fixed this in bug 1816000?

That's correct. FailFP/0xbad magical value for FP was removed.

The WASM exception handling mechanism

Just to clarify: FailFP was used for "signaling" to Wasm entry point (from JS/JIT) about trap, and it is not related to Wasm exception handling (which is handled without special FP manipulations).

Flags: needinfo?(ydelendik)

Unfortunately I don't seem to still have the code I used to detect this. I was checking if I could successfully unwind the frame pointer from some relatively hot piece of code (gc handles or something) and then running unit tests. The need was exactly as describe in Bug 1819000, so lets just close this as fixed.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.