Commit 176a2b24 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Reland "[heap] Allow a minimum semi-space size of 512K."

This patch changes the semi-space size to 512K.

> Original commit message:
> Revert "[heap] Allow a minimum semi-space size of 512K."
> This reverts commit 0d2ed6c3.
> The CL introduced perf regressions: crbug.com/735649.
> We are going to reland the CL in an isolated V8 roll to ensure
> that perf regressions are attributed correctly.

> Original commit message:
> > [heap] Allow a minimum semi-space size of 512K.
> > This CL also reduces the minimum semi-space size to 512K.
> > BUG=chromium:716032
> BUG=chromium:735649

Change-Id: Iabc377cba2911b28d51b98bb5b85134d4e893632
Reviewed-on: https://chromium-review.googlesource.com/575066Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#46763}
parent bb29f9a4
......@@ -87,7 +87,7 @@ Heap::Heap()
// semispace_size_ should be a power of 2 and old_generation_size_ should
// be a multiple of Page::kPageSize.
max_semi_space_size_(8 * (kPointerSize / 4) * MB),
initial_semispace_size_(MB),
initial_semispace_size_(Page::kPageSize),
max_old_generation_size_(700ul * (kPointerSize / 4) * MB),
initial_max_old_generation_size_(max_old_generation_size_),
initial_old_generation_size_(max_old_generation_size_ /
......
......@@ -575,7 +575,7 @@ class Heap {
// Semi-space size needs to be a multiple of page size.
static const int kMinSemiSpaceSizeInKB =
2 * kPointerMultiplier * ((1 << kPageSizeBits) / KB);
1 * kPointerMultiplier * ((1 << kPageSizeBits) / KB);
static const int kMaxSemiSpaceSizeInKB =
16 * kPointerMultiplier * ((1 << kPageSizeBits) / KB);
......
......@@ -66,10 +66,9 @@ TEST(Heap, SemiSpaceSize) {
const size_t KB = static_cast<size_t>(i::KB);
const size_t MB = static_cast<size_t>(i::MB);
const size_t pm = i::Heap::kPointerMultiplier;
ASSERT_EQ(1u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(0u) * KB);
ASSERT_EQ(1u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(512u * MB) * KB);
ASSERT_EQ(7u * pm * MB / 2,
i::Heap::ComputeMaxSemiSpaceSize(1024u * MB) * KB);
ASSERT_EQ(1u * pm * MB / 2, i::Heap::ComputeMaxSemiSpaceSize(0u) * KB);
ASSERT_EQ(1u * pm * MB / 2, i::Heap::ComputeMaxSemiSpaceSize(512u * MB) * KB);
ASSERT_EQ(3u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(1024u * MB) * KB);
ASSERT_EQ(8u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(2024u * MB) * KB);
ASSERT_EQ(8u * pm * MB, i::Heap::ComputeMaxSemiSpaceSize(4095u * MB) * KB);
}
......
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