Closed Bug 2095475 Opened 8 days ago Closed 7 days ago

Consider canceling Ion compilations in js::SetRealmIsDyingHint

Categories

(Core :: JavaScript Engine: JIT, task)

task

Tracking

()

RESOLVED FIXED
163 Branch
Tracking Status
firefox163 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 external file)

js::SetRealmIsDyingHint is called when the browser navigates to a different page/realm. We discard JIT code more eagerly for dying realms, but we should also consider canceling off-thread compilations immediately. It's probably possible for JS code to still run in such realms, but it's unlikely and even less likely to benefit from Ion, so canceling here is a good trade-off.

When the browser tells us a window's realm is dying, we now cancel its
off-thread Ion compilations. Scripts in that realm are unlikely to run again or
benefit from Ion compilation.

One of the effects this has is that we no longer hit the TooManyUnlinkedTasks
threshold on Speedometer so we do less (eager) linking of Ion compilations.

This is just an heuristic so the patch adds a WaitForRunningCompiles argument
to CancelOffThreadIonCompile so that we don't wait for background threads.

Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 7 days ago
Resolution: --- → FIXED
Target Milestone: --- → 163 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: