Add a flag to specify fixed heap growing factor to be used in tests.

BUG=chromium:565306
LOG=NO

Review URL: https://codereview.chromium.org/1497743003

Cr-Commit-Position: refs/heads/master@{#32603}
This commit is contained in:
ulan 2015-12-04 00:58:46 -08:00 committed by Commit bot
parent 0e711de172
commit 48b1243a30
2 changed files with 6 additions and 0 deletions

View File

@ -695,6 +695,8 @@ DEFINE_BOOL(verify_heap, false, "verify heap pointers before and after GC")
DEFINE_BOOL(memory_reducer, true, "use memory reducer")
DEFINE_BOOL(scavenge_reclaim_unmodified_objects, false,
"remove unmodified and unreferenced objects")
DEFINE_INT(heap_growing_percent, 0,
"specifies heap growing factor as (1 + heap_growing_percent/100)")
// counters.cc
DEFINE_INT(histogram_interval, 600000,

View File

@ -4911,6 +4911,10 @@ void Heap::SetOldGenerationAllocationLimit(intptr_t old_gen_size,
factor = kMinHeapGrowingFactor;
}
if (FLAG_heap_growing_percent > 0) {
factor = 1.0 + FLAG_heap_growing_percent / 100.0;
}
old_generation_allocation_limit_ =
CalculateOldGenerationAllocationLimit(factor, old_gen_size);