[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/445176 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Commit-Queue: Michael Lippautz <mlippautz@chromium.org> Cr-Commit-Position: refs/heads/master@{#43320}
This commit is contained in:
parent
2c7f32e21c
commit
3cf5edae90
@ -1799,14 +1799,13 @@ void Heap::Scavenge() {
|
||||
}
|
||||
|
||||
void Heap::ComputeFastPromotionMode(double survival_rate) {
|
||||
if (new_space_->IsAtMaximumCapacity() && !FLAG_optimize_for_size) {
|
||||
fast_promotion_mode_ =
|
||||
FLAG_fast_promotion_new_space &&
|
||||
survival_rate >= kMinPromotedPercentForFastPromotionMode;
|
||||
if (FLAG_trace_gc_verbose) {
|
||||
PrintIsolate(isolate(), "Fast promotion mode: %s survival rate: %f%%\n",
|
||||
fast_promotion_mode_ ? "true" : "false", survival_rate);
|
||||
}
|
||||
fast_promotion_mode_ =
|
||||
!FLAG_optimize_for_size && FLAG_fast_promotion_new_space &&
|
||||
new_space_->IsAtMaximumCapacity() &&
|
||||
survival_rate >= kMinPromotedPercentForFastPromotionMode;
|
||||
if (FLAG_trace_gc_verbose) {
|
||||
PrintIsolate(isolate(), "Fast promotion mode: %s survival rate: %f%%\n",
|
||||
fast_promotion_mode_ ? "true" : "false", survival_rate);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user