Skip to content

Commit

Permalink
[flags] Make --young-generation-large-objects readonly
Browse files Browse the repository at this point in the history
This flag is already baked into the snapshot by enabling more
write-barrier elimination, so changing it at runtime would be a bug.

Change-Id: I3bc73f3c880285ec46b69b0c44934f64b49912ee
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2290856
Commit-Queue: Tobias Tebbi <tebbi@chromium.org>
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69046}
  • Loading branch information
tebbi authored and Commit Bot committed Jul 24, 2020
1 parent 6828e44 commit 5e39557
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions src/flags/flag-definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -1092,9 +1092,10 @@ DEFINE_BOOL(fast_promotion_new_space, false,

DEFINE_BOOL(clear_free_memory, false, "initialize free memory with 0")

DEFINE_BOOL(young_generation_large_objects, true,
"allocates large objects by default in the young generation large "
"object space")
DEFINE_BOOL_READONLY(
young_generation_large_objects, true,
"allocates large objects by default in the young generation large "
"object space")

// assembler-ia32.cc / assembler-arm.cc / assembler-arm64.cc / assembler-x64.cc
DEFINE_BOOL(debug_code, DEBUG_BOOL,
Expand Down
6 changes: 3 additions & 3 deletions test/cctest/heap/test-heap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6057,7 +6057,7 @@ TEST(Regress618958) {

TEST(YoungGenerationLargeObjectAllocationScavenge) {
if (FLAG_minor_mc) return;
FLAG_young_generation_large_objects = true;
if (!FLAG_young_generation_large_objects) return;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Expand Down Expand Up @@ -6087,7 +6087,7 @@ TEST(YoungGenerationLargeObjectAllocationScavenge) {

TEST(YoungGenerationLargeObjectAllocationMarkCompact) {
if (FLAG_minor_mc) return;
FLAG_young_generation_large_objects = true;
if (!FLAG_young_generation_large_objects) return;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Expand Down Expand Up @@ -6117,7 +6117,7 @@ TEST(YoungGenerationLargeObjectAllocationMarkCompact) {

TEST(YoungGenerationLargeObjectAllocationReleaseScavenger) {
if (FLAG_minor_mc) return;
FLAG_young_generation_large_objects = true;
if (!FLAG_young_generation_large_objects) return;
CcTest::InitializeVM();
v8::HandleScope scope(CcTest::isolate());
Heap* heap = CcTest::heap();
Expand Down

0 comments on commit 5e39557

Please sign in to comment.