Bug 1812268 - Add a GC parameter to control the number of threads used for parallel...
commit82dbe984bc4d35bb016a38a6d28f8f71bae4c3b2
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 25 Jan 2023 17:20:04 +0000 (25 17:20 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Wed, 25 Jan 2023 17:20:04 +0000 (25 17:20 +0000)
treeb5398ca9bcfeff71a8b5ea1664b03cc5045837cf
parente4ae58ff0d7e5916191cea88a80ab7251de55c97
Bug 1812268 - Add a GC parameter to control the number of threads used for parallel marking r=sfink

This also adds a shell option to set the parameter.

Care is taken to avoid using more threads than we start parallel GC tasks for
as otherwise we can deadlock.

Differential Revision: https://phabricator.services.mozilla.com/D167783
js/public/GCAPI.h
js/src/gc/GC.cpp
js/src/gc/GCRuntime.h
js/src/gc/ParallelMarking.cpp
js/src/shell/js.cpp
js/src/vm/HelperThreadState.h