Make jit::JitSpewEnabled inlineable
Categories
(Core :: JavaScript Engine: JIT, enhancement, P3)
Tracking
()
Tracking | Status | |
---|---|---|
firefox132 | --- | fixed |
People
(Reporter: jseward, Assigned: jseward)
Details
Attachments
(1 file)
Optimised, non-debug but --enable-jitspew builds of SM wind up spending
measurable amounts of time in jit::JitSpewEnabled when baseline-compiling wasm.
This is because wasm baseline generates code very rapidly, and each masm call
ends up requiring a call to jit::JitSpewEnabled. That is currently
non-inlineable, at least outside of the world of LTO. It would be nice to
reduce this overhead somewhat by making it inlineable.
Assignee | ||
Comment 1•3 days ago
|
||
To put some numbers on that: on x86_64-linux, with a --disable-debug
--enable-optimize="-O2" --enable-jitspew build, when compiling a .wasm that
contains 6308911 bytecode bytes, perf says:
(2nd best of 10 runs)
before
9,735,325,068 instructions:u # 2.91 insn per cycle
3,356,261,613 cycles:u # 3.627 GHz
after
9,184,935,010 instructions:u # 2.84 insn per cycle
3,221,748,038 cycles:u # 3.602 GHz
so the problem is both real and fixable. Patch to follow.
Assignee | ||
Comment 2•3 days ago
|
||
When JS_JITSPEW is enabled, allow jit::JitSpewEnabled to be inlined, since it
can be called very intensively in wasm baseline compilation. For non
JS_JITSPEW builds, nothing changes.
Comment 4•16 hours ago
|
||
bugherder |
Description
•