Commit 238e8179 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Add a flag to enable memory reducer for small heaps

Bug: chromium:933107
Change-Id: Ie3a485447f96228d5c8d7fc169c9aabf8ccf6599
Reviewed-on: https://chromium-review.googlesource.com/c/1477057Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59658}
parent b08c6947
......@@ -768,6 +768,8 @@ DEFINE_BOOL(verify_heap_skip_remembered_set, false,
#endif
DEFINE_BOOL(move_object_start, true, "enable moving of object starts")
DEFINE_BOOL(memory_reducer, true, "use memory reducer")
DEFINE_BOOL(memory_reducer_for_small_heaps, true,
"use memory reducer for small heaps")
DEFINE_INT(heap_growing_percent, 0,
"specifies heap growing factor as (1 + heap_growing_percent/100)")
DEFINE_INT(v8_os_page_size, 0, "override OS page size (in KBytes)")
......
......@@ -4689,7 +4689,8 @@ void Heap::NotifyOldGenerationExpansion() {
const size_t kMemoryReducerActivationThreshold = 1 * MB;
if (old_generation_capacity_after_bootstrap_ && ms_count_ == 0 &&
OldGenerationCapacity() >= old_generation_capacity_after_bootstrap_ +
kMemoryReducerActivationThreshold) {
kMemoryReducerActivationThreshold &&
FLAG_memory_reducer_for_small_heaps) {
MemoryReducer::Event event;
event.type = MemoryReducer::kPossibleGarbage;
event.time_ms = MonotonicallyIncreasingTimeInMs();
......
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