Bug 1855376 - Free stacks of extra parallel markers between GCs r=sfink
commit9bb856e20be9bb04e1650f040e7f40280054342c
authorJon Coppeard <jcoppeard@mozilla.com>
Thu, 28 Sep 2023 06:48:34 +0000 (28 06:48 +0000)
committerJon Coppeard <jcoppeard@mozilla.com>
Thu, 28 Sep 2023 06:48:34 +0000 (28 06:48 +0000)
treeee5ea4bad57664ed4acd9d0f7c50ab0bf6830501
parent226c8aba6aeb29a98d8eb374ab26a23b89e6afd0
Bug 1855376 - Free stacks of extra parallel markers between GCs r=sfink

We currently keep all mark stacks allocated after GC, shrunk to their default size.

For parallel marking we can free the mark stacks of all markers apart from the
first. If we fail to allocate them at the start of marking we can fall back to
not marking in parallel.

This fixes the AWSY regression.

The patch also changes GCMarker::reset() to cover everything that happens in
GCMarker::stop() so you don't need to call both.

Differential Revision: https://phabricator.services.mozilla.com/D189342
js/src/gc/GC.cpp
js/src/gc/GCMarker.h
js/src/gc/GCRuntime.h
js/src/gc/Marking.cpp
js/src/gc/Sweeping.cpp
js/src/gc/Verifier.cpp