Commit 3cf5edae authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Fix fast promotion mode computation

Bailout didn't happen if we decided to shrink newspace at the end of a
Mark-Compact GC.

BUG=chromium:693413

Change-Id: Ia4acf565c836b188655773e74083f9151e4ab30b
Reviewed-on: https://chromium-review.googlesource.com/445176Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43320}
parent 2c7f32e2
...@@ -1799,14 +1799,13 @@ void Heap::Scavenge() { ...@@ -1799,14 +1799,13 @@ void Heap::Scavenge() {
} }
void Heap::ComputeFastPromotionMode(double survival_rate) { void Heap::ComputeFastPromotionMode(double survival_rate) {
if (new_space_->IsAtMaximumCapacity() && !FLAG_optimize_for_size) { fast_promotion_mode_ =
fast_promotion_mode_ = !FLAG_optimize_for_size && FLAG_fast_promotion_new_space &&
FLAG_fast_promotion_new_space && new_space_->IsAtMaximumCapacity() &&
survival_rate >= kMinPromotedPercentForFastPromotionMode; survival_rate >= kMinPromotedPercentForFastPromotionMode;
if (FLAG_trace_gc_verbose) { if (FLAG_trace_gc_verbose) {
PrintIsolate(isolate(), "Fast promotion mode: %s survival rate: %f%%\n", PrintIsolate(isolate(), "Fast promotion mode: %s survival rate: %f%%\n",
fast_promotion_mode_ ? "true" : "false", survival_rate); fast_promotion_mode_ ? "true" : "false", survival_rate);
}
} }
} }
......
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