BaselineJIT: Consolidate Baseline fallback vmcalls when they have similar signatures

RESOLVED WONTFIX

Status

()

Core
JavaScript Engine: JIT
RESOLVED WONTFIX
4 years ago
4 years ago

People

(Reporter: djvj, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

4 years ago
We have a lot of calls to baseline fallbacks VMFunctions that all have very similar signatures.. each one requiring its own trampoline.

These can be consolidated into a few basic signature types, and a single VMFunction for each signature type can be written that switches on the stub kind and dispatches to each specific fallback function.

This should reduce the per-compartment memory usage by trampolines incurred by baseline.  This is a pure win, no losses.
(Reporter)

Comment 1

4 years ago
Created attachment 8474861 [details] [diff] [review]
consolidate-baseline-fallbacks.patch

This patch consolidates functions with two signature variants:

(HandleValue, MutableHandleValue)[PopNone]

and

(HandleValue, HandleValue, MutableHandleValue)[Pop2]
Attachment #8474861 - Flags: review?(jdemooij)
(Reporter)

Comment 2

4 years ago
Created attachment 8474864 [details] [diff] [review]
consolidate-baseline-fallbacks.patch

Previous patch was incomplete.  This one is correct.  Running on try now:

https://tbpl.mozilla.org/?tree=Try&rev=9f01791e636b
Attachment #8474861 - Attachment is obsolete: true
Attachment #8474861 - Flags: review?(jdemooij)
Attachment #8474864 - Flags: review?(jdemooij)
(Reporter)

Comment 3

4 years ago
Talked to Jan and this is not as big of a win as I thought.. I was thinking these trampolines were per-compartment when in fact they are per-runtime.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → WONTFIX

Updated

4 years ago
Attachment #8474864 - Flags: review?(jdemooij)
You need to log in before you can comment on or make changes to this bug.