From 03671ae9eff834706cfd6e7c9935d76cfe1d8f28 Mon Sep 17 00:00:00 2001 From: "hpayer@chromium.org" Date: Thu, 16 May 2013 09:21:19 +0000 Subject: [PATCH] Increase old generation space significantly if we observe a high promotion rate. BUG= Review URL: https://codereview.chromium.org/15104004 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14701 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/heap.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/heap.h b/src/heap.h index f1f9c36..b24b0b3 100644 --- a/src/heap.h +++ b/src/heap.h @@ -1585,6 +1585,11 @@ class Heap { intptr_t limit = Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit); limit += new_space_.Capacity(); + // TODO(hpayer): Can be removed when when pretenuring is supported for all + // allocation sites. + if (IsHighSurvivalRate() && IsStableOrIncreasingSurvivalTrend()) { + limit *= 2; + } intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; return Min(limit, halfway_to_the_max); } @@ -1595,6 +1600,11 @@ class Heap { intptr_t limit = Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit); limit += new_space_.Capacity(); + // TODO(hpayer): Can be removed when when pretenuring is supported for all + // allocation sites. + if (IsHighSurvivalRate() && IsStableOrIncreasingSurvivalTrend()) { + limit *= 2; + } intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; return Min(limit, halfway_to_the_max); } -- 2.7.4