Closed Bug 1961780 Opened 24 days ago Closed 22 days ago

We're missing checks for canceled compilations in CodeGenerator

Categories

(Core :: JavaScript Engine: JIT, task, P1)

task

Tracking

()

RESOLVED FIXED
139 Branch
Tracking Status
firefox139 --- fixed

People

(Reporter: jandem, Assigned: jandem)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The main thread can cancel ongoing Ion compilations and it will then wait until these compilations are finished. To support this the Ion backend has to check mir->shouldCancel() regularly, but I just noticed we're missing checks for this in CodeGenerator. This is likely because when off-thread compilation was first implemented, codegen still happened on the main thread.

Code generation can be pretty slow and this means in certain cases we block the main thread longer than we should.

We were missing shouldCancel checks in CodeGenerator, likely because this step
initially always ran on the main thread.

This patch also adds these checks to some other places. In OptimizeMIR we now
do this consistently after each optimization pass.

From what I recall we kept it at the stage level to avoid overhead.

Severity: -- → N/A
Priority: -- → P1
Blocks: sm-jits
Pushed by jdemooij@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/dc33277aa0c5 Check for canceled compilations in more places in the JIT backend. r=iain
Status: ASSIGNED → RESOLVED
Closed: 22 days ago
Resolution: --- → FIXED
Target Milestone: --- → 139 Branch
QA Whiteboard: [qa-triage-done-c140/b139]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: