Closed Bug 1705733 Opened 3 years ago Closed 3 years ago

Replace threads.empty() check with CanUseExtraThreads()

Categories

(Core :: JavaScript Engine, enhancement, P2)

enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: allstars.chh, Assigned: allstars.chh)

References

Details

Attachments

(1 file)

There are various places that will check threads.empty() in GlobalHelperThreadState.
for example,
CancelOffThreadIonCompileLocked
https://searchfox.org/mozilla-central/rev/5e70cd673a0ba0ad19b662c1cf656e0823781596/js/src/vm/HelperThreads.cpp#348

But Ion OffThread compilation is enabled when CanUseExtraThreads is true
https://searchfox.org/mozilla-central/rev/5e70cd673a0ba0ad19b662c1cf656e0823781596/js/src/jit/Ion.cpp#1934

So those threads.empty() should be changed to CanUseExtraThreads().

When we dispatch tasks to the external thread pool, we shouldn't check the threads(lock).empty(), as it is for internal threading inside Spidermonkey, so I'd like to get rid of those.

Severity: -- → N/A
Priority: -- → P2
Pushed by allstars.chh@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/a511889d7871
Replace threads.empty() check with CanUseExtraThreads(). r=jonco
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: