Commit fb0ddfe8 authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

heap: Aggressively reduce memory on testing GCs

This restores previous state where we would (a) discard pages, and (b)
compact on testing GCs that run without stack.

Bug: chromium:1079150, chromium:1082136, chromium:1077663
Change-Id: I53fa1e97a2537aa93d41772ace1f1c803deaa342
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2199152Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#768711}
parent 47c7873e
......@@ -357,7 +357,8 @@ bool HeapCompact::ShouldCompact(BlinkGC::StackState stack_state,
// Only enable compaction when in a memory reduction garbage collection as it
// may significantly increase the final garbage collection pause.
if (reason == BlinkGC::GCReason::kUnifiedHeapForMemoryReductionGC) {
if (reason == BlinkGC::GCReason::kUnifiedHeapForMemoryReductionGC ||
reason == BlinkGC::GCReason::kUnifiedHeapForcedForTestingGC) {
return free_list_size_ > kFreeListSizeThreshold;
}
......
......@@ -276,7 +276,9 @@ class PLATFORM_EXPORT ThreadState final {
// Returns true if the current GC is a memory reducing GC.
bool IsMemoryReducingGC() const {
return current_gc_data_.reason ==
BlinkGC::GCReason::kUnifiedHeapForMemoryReductionGC;
BlinkGC::GCReason::kUnifiedHeapForMemoryReductionGC ||
current_gc_data_.reason ==
BlinkGC::GCReason::kUnifiedHeapForcedForTestingGC;
}
bool IsUnifiedHeapGC() const {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment