Open Bug 1460304 Opened 8 years ago Updated 3 years ago

Investigate per-process JIT trampoline overhead

Categories

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

enhancement

Tracking

()

People

(Reporter: tcampbell, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [overhead:10k])

We currently generate 300+ trampolines on process start-up. As we increase our process count for Fission, we should see what we can do to reduce the overhead of these trampolines. Generating them statically would be preferred if there was an elegant way to do so. Alternatively, using some form of IPC shared memory for them could be another strategy. We should begin by measuring the size of these and time spent generating them on start.
It is possible to generate them statically, the idea is: 1. Remove runtime information (JitContext pointers) 2. Create a new binary to generate these trampoline at build-time. - Link only against the MacroAssembler. - Create all trampolines. - Generate static char[] arrays with the code of the generated trampolines. 3. Link the js shell with this newly generated file.
Ted, do you have any idea how much overhead this is? We're guessing < 10k for now.
Whiteboard: [overhead:10k]
(In reply to Eric Rahm [:erahm] (please no mozreview requests) from comment #2) > Ted, do you have any idea how much overhead this is? We're guessing < 10k > for now. It's more like 50-60k, IIRC.
(But it's worth double checking in non-debug builds.)
Coming soon: jitted code for atomics, bug 1394420. We're not talking about much code here, maybe a couple of KB. But if we're developing solutions for this for trampolines it would be nice if the atomics could opt into the same machinery.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.