Closed Bug 1736841 Opened 3 years ago Closed 3 years ago

HelperThreads: Schedule IonCompile task last when no JS is executed.

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
96 Branch
Tracking Status
firefox96 --- fixed

People

(Reporter: nbp, Assigned: nbp)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Currently, IonCompile tasks are schedule quite high in our priority list of helper thread.
This can be a problem as IonCompile task can last quite a long time.

While IonCompile task should remain a priority when we are executing JS code, these should no longer be considered a priority when no JS code is executing. When no JS code is being executed, we should prioritize ParseTask and WasmTier1 tasks, as these are the one which would most likely to be blocking upcoming code execution.

This modification makes the hypothesis that we should not be prioritizing the
compilation with our optimizing compiler while we could have scripts which are
pending to be parsed.

This patch resolve this issue by adding a flag to query whether the thread for
which the Ion compilation is schedule has some JS on its stack. Otherwise, it
will schedule Ion compilations after having parsed all scripts which are waiting
to be parsed.

Assignee: nobody → nicolas.b.pierron
Status: NEW → ASSIGNED
Attachment #9247245 - Attachment description: Bug 1736841 - Reduce IonCompilation priority when no JS is executed. r= → Bug 1736841 - Reduce IonCompilation priority when no JS is executed.
Pushed by npierron@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ecf3b04a681c
Reduce IonCompilation priority when no JS is executed. r=jandem
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: