Closed Bug 1810921 Opened 3 years ago Closed 3 years ago

On a JS demo (https://www.fxhash.xyz/generative/slug/beads-and-planets) Nightly appears to spend time in non-JIT path in some functions

Categories

(Core :: JavaScript Engine, task)

task

Tracking

()

RESOLVED FIXED
111 Branch
Tracking Status
firefox111 --- fixed

People

(Reporter: mayankleoboy1, Assigned: jandem)

References

(Blocks 1 open bug, )

Details

Attachments

(1 file)

Go to https://www.fxhash.xyz/generative/slug/beads-and-planets
Click on "run" .
Additionally, you can click on the "Variations" button a few times to generate variations of the demo

Nightly: https://share.firefox.dev/3GORMW3
Chrome: https://share.firefox.dev/3QUiOzW

On Nightly, the concat function appears to spend all the time in Baseline.

Additionally, if you click on the "Native" radio button on the Profiler UI, the top entry "js:RunScript" appears to spend 94% of the time in Baseline. I read this entry as : "From Geckos perspective, SM is a blackbox/function. That blackbox/function is taking 8.3% of the total time running the demo, and the blackbox/function runs 94% in Baseline"

Flags: needinfo?(jdemooij)

This is because we call the self-hosted Array.prototype.concat with too many actual arguments for Ion/Warp (> 4096) but enough for Baseline (limit there is 20,000). Both JITs handle actual arguments in a very similar way, so I can't think of a good reason to use a lower limit for Ion code.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)

Ion was using JitOptions.maxStackArgs (4096) and Baseline had BASELINE_MAX_ARGS_LENGTH (20,000).
This patch increases JitOptions.maxStackArgs to 20,000 and uses it for all JITs.

The JITs use the same call ABI and handle actual arguments in a similar way, so there's
no good reason to use a lower limit for Ion code. Note that handling of formal arguments
is very different in Ion and we already have a much smaller limit for that.

Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/017c8fe82453 Use same limit for number of actual arguments for Baseline and Ion. r=iain
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

Latest profile: https://share.firefox.dev/3ZP7fxY
concat spends all of the time in ion now. Also seems to be faster by a couple of hundred miliseconds.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: