Bug 1527742 - Don't skip decommitting memory when we are doing a shrinking GC. r=sfink

This wins at least 4 MB on AWSY's JS Opt number because we could have a lot of
unused arenas.

Differential Revision: https://phabricator.services.mozilla.com/D19707

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Jan de Mooij 2019-02-15 01:32:33 +00:00
Родитель ad84b74ed1
Коммит 271bc01510
1 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -3405,9 +3405,11 @@ void GCRuntime::startDecommit() {
MOZ_ASSERT(CurrentThreadCanAccessRuntime(rt));
MOZ_ASSERT(!decommitTask.isRunning());
// If we are allocating heavily enough to trigger "high freqency" GC, then
// skip decommit so that we do not compete with the mutator.
if (schedulingState.inHighFrequencyGCMode()) {
// If we are allocating heavily enough to trigger "high frequency" GC, then
// skip decommit so that we do not compete with the mutator. However if we're
// doing a shrinking GC we always decommit to release as much memory as
// possible.
if (schedulingState.inHighFrequencyGCMode() && !cleanUpEverything) {
return;
}