Closed Bug 1919206 Opened 4 days ago Closed 16 hours ago

Make jit::JitSpewEnabled inlineable

Categories

(Core :: JavaScript Engine: JIT, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
132 Branch
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.

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.

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.

Pushed by jseward@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fb4318779187 Make jit::JitSpewEnabled inlineable. r=mgaudet.
Status: NEW → RESOLVED
Closed: 16 hours ago
Resolution: --- → FIXED
Target Milestone: --- → 132 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: