We're missing checks for canceled compilations in CodeGenerator
Categories
(Core :: JavaScript Engine: JIT, task, P1)
Tracking
()
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.
Assignee | ||
Comment 1•24 days ago
|
||
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.
Comment 2•23 days ago
|
||
From what I recall we kept it at the stage level to avoid overhead.
Comment 4•22 days ago
|
||
bugherder |
Updated•16 days ago
|
Description
•