From d7f8e611a5d0c8d061d3db13c5e74bb30151ed95 Mon Sep 17 00:00:00 2001 From: yangguo Date: Tue, 30 Jun 2015 00:48:23 -0700 Subject: [PATCH] Increase code space allowance for first page size. This has become necessary as we have more experimental natives that run after deserializing from the snapshot. R=hpayer@chromium.org BUG=v8:4200 LOG=N Review URL: https://codereview.chromium.org/1218973002 Cr-Commit-Position: refs/heads/master@{#29367} --- src/snapshot/snapshot-common.cc | 2 +- test/cctest/cctest.status | 6 ------ test/cctest/test-spaces.cc | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/snapshot/snapshot-common.cc b/src/snapshot/snapshot-common.cc index 89fe8af..ab8a884 100644 --- a/src/snapshot/snapshot-common.cc +++ b/src/snapshot/snapshot-common.cc @@ -137,7 +137,7 @@ void CalculateFirstPageSizes(bool is_default_snapshot, 2 * context_reservations[context_index].chunk_size()) + Page::kObjectStartOffset; // Add a small allowance to the code space for small scripts. - if (space == CODE_SPACE) required += 32 * KB; + if (space == CODE_SPACE) required += 64 * KB; } else { // We expect the vanilla snapshot to only require on page per space. DCHECK(!is_default_snapshot); diff --git a/test/cctest/cctest.status b/test/cctest/cctest.status index 2ef8296..0686205 100644 --- a/test/cctest/cctest.status +++ b/test/cctest/cctest.status @@ -154,9 +154,6 @@ # BUG(v8:3434). ' test-api/LoadICFastApi_DirectCall_GCMoveStubWithProfiler': [SKIP], - - # BUG(v8:4200). - 'test-spaces/SizeOfFirstPageIsLargeEnough': [PASS, FAIL], }], # 'arch == arm64' ['arch == arm64 and simulator_run == True', { @@ -293,9 +290,6 @@ 'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [SKIP], 'test-serialize/DeserializeAndRunScript2': [SKIP], 'test-serialize/DeserializeFromSecondSerialization': [SKIP], - - # BUG(v8:4200). - 'test-spaces/SizeOfFirstPageIsLargeEnough': [PASS, FAIL], }], # 'arch == mips64el' ############################################################################## diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc index 85b33c9..3f5e437 100644 --- a/test/cctest/test-spaces.cc +++ b/test/cctest/test-spaces.cc @@ -439,6 +439,9 @@ TEST(SizeOfFirstPageIsLargeEnough) { if (!isolate->snapshot_available()) return; if (Snapshot::EmbedsScript(isolate)) return; + // If this test fails due to enabling experimental natives that are not part + // of the snapshot, we may need to adjust CalculateFirstPageSizes. + // Freshly initialized VM gets by with one page per space. for (int i = FIRST_PAGED_SPACE; i <= LAST_PAGED_SPACE; i++) { // Debug code can be very large, so skip CODE_SPACE if we are generating it. -- 2.7.4