Bug 1052793, part 2 - Shrink GC buffers during compartmental GCs. r=terrence

With part 1, many more GCs are compartmental, so it is no longer a
good indication that there is heavy activity. If we don't regularly
try to shrink GC buffers, we don't decommit arenas enough, causing a
large regression in memory usage.
This commit is contained in:
Andrew McCreight 2016-02-18 15:21:48 -08:00
Родитель 8705772a81
Коммит 1575a306bd
1 изменённых файлов: 3 добавлений и 6 удалений

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

@ -2288,13 +2288,10 @@ DOMGCSliceCallback(JSRuntime *aRt, JS::GCProgress aProgress, const JS::GCDescrip
}
} else {
nsJSContext::KillFullGCTimer();
}
// Avoid shrinking during heavy activity, which is suggested by
// compartment GC. We don't need to shrink after a shrinking GC as this
// happens automatically in this case.
if (aDesc.invocationKind_ == GC_NORMAL) {
nsJSContext::PokeShrinkGCBuffers();
}
if (aDesc.invocationKind_ == GC_NORMAL) {
nsJSContext::PokeShrinkGCBuffers();
}
if (ShouldTriggerCC(nsCycleCollector_suspectedCount())) {