Closed Bug 1547721 Opened 3 years ago Closed 3 years ago

Add an Ion script size limit

Categories

(Core :: JavaScript Engine: JIT, task)

task
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

Details

Attachments

(1 file)

We have a script size limit for when off-thread compilation isn't available. When off-thread compilation is available, we compute Ion's warm-up threshold based on the script size, but this can still get out of control. For example bug 1536006 is the result of Ion compiling a script with bytecode length 154905.

On Octane the scripts with length > 10,000 we Ion compile are: 15475, 16150, 62078 bytes. That suggests a limit of 100,000 is probably a safe starting point.

We had a script size limit (and number of locals/args limit) when off-thread Ion
compilation wasn't available, but no hard limit when off-thread compilation is
available. This patch addresses that.

This patch also converts the main-thread limits from constants to JitOptions
because that's what we use for new code.

Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c0101502b8b7
Add an Ion script size limit. r=tcampbell
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
Regressions: 1414560
No longer regressions: 1414560
You need to log in before you can comment on or make changes to this bug.