Simplify ConfigureHeap and change --max_new_space_size to --max_semi_space_size.
BUG= R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/271843005 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21204 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
7c45d49861
commit
de21c8a245
@ -3865,8 +3865,8 @@ class V8_EXPORT ResourceConstraints {
|
||||
uint64_t virtual_memory_limit,
|
||||
uint32_t number_of_processors);
|
||||
|
||||
int max_new_space_size() const { return max_new_space_size_; }
|
||||
void set_max_new_space_size(int value) { max_new_space_size_ = value; }
|
||||
int max_semi_space_size() const { return max_semi_space_size_; }
|
||||
void set_max_semi_space_size(int value) { max_semi_space_size_ = value; }
|
||||
int max_old_space_size() const { return max_old_space_size_; }
|
||||
void set_max_old_space_size(int value) { max_old_space_size_ = value; }
|
||||
int max_executable_size() const { return max_executable_size_; }
|
||||
@ -3885,7 +3885,7 @@ class V8_EXPORT ResourceConstraints {
|
||||
}
|
||||
|
||||
private:
|
||||
int max_new_space_size_;
|
||||
int max_semi_space_size_;
|
||||
int max_old_space_size_;
|
||||
int max_executable_size_;
|
||||
uint32_t* stack_limit_;
|
||||
|
20
src/api.cc
20
src/api.cc
@ -419,7 +419,7 @@ Extension::Extension(const char* name,
|
||||
|
||||
|
||||
ResourceConstraints::ResourceConstraints()
|
||||
: max_new_space_size_(0),
|
||||
: max_semi_space_size_(0),
|
||||
max_old_space_size_(0),
|
||||
max_executable_size_(0),
|
||||
stack_limit_(NULL),
|
||||
@ -442,19 +442,19 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
|
||||
#endif
|
||||
|
||||
if (physical_memory <= low_limit) {
|
||||
set_max_new_space_size(i::Heap::kMaxNewSpaceSizeLowMemoryDevice);
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeLowMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeLowMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeLowMemoryDevice);
|
||||
} else if (physical_memory <= medium_limit) {
|
||||
set_max_new_space_size(i::Heap::kMaxNewSpaceSizeMediumMemoryDevice);
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeMediumMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeMediumMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeMediumMemoryDevice);
|
||||
} else if (physical_memory <= high_limit) {
|
||||
set_max_new_space_size(i::Heap::kMaxNewSpaceSizeHighMemoryDevice);
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeHighMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeHighMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeHighMemoryDevice);
|
||||
} else {
|
||||
set_max_new_space_size(i::Heap::kMaxNewSpaceSizeHugeMemoryDevice);
|
||||
set_max_semi_space_size(i::Heap::kMaxSemiSpaceSizeHugeMemoryDevice);
|
||||
set_max_old_space_size(i::Heap::kMaxOldSpaceSizeHugeMemoryDevice);
|
||||
set_max_executable_size(i::Heap::kMaxExecutableSizeHugeMemoryDevice);
|
||||
}
|
||||
@ -465,7 +465,7 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
|
||||
// Reserve no more than 1/8 of the memory for the code range, but at most
|
||||
// 512 MB.
|
||||
set_code_range_size(
|
||||
i::Min(512 * i::MB, static_cast<int>(virtual_memory_limit >> 3)));
|
||||
i::Min(512, static_cast<int>((virtual_memory_limit >> 3) / i::MB)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -473,15 +473,15 @@ void ResourceConstraints::ConfigureDefaults(uint64_t physical_memory,
|
||||
bool SetResourceConstraints(Isolate* v8_isolate,
|
||||
ResourceConstraints* constraints) {
|
||||
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
|
||||
int new_space_size = constraints->max_new_space_size();
|
||||
int semi_space_size = constraints->max_semi_space_size();
|
||||
int old_space_size = constraints->max_old_space_size();
|
||||
int max_executable_size = constraints->max_executable_size();
|
||||
int code_range_size = constraints->code_range_size();
|
||||
if (new_space_size != 0 || old_space_size != 0 || max_executable_size != 0 ||
|
||||
code_range_size != 0) {
|
||||
if (semi_space_size != 0 || old_space_size != 0 ||
|
||||
max_executable_size != 0 || code_range_size != 0) {
|
||||
// After initialization it's too late to change Heap constraints.
|
||||
ASSERT(!isolate->IsInitialized());
|
||||
bool result = isolate->heap()->ConfigureHeap(new_space_size / 2,
|
||||
bool result = isolate->heap()->ConfigureHeap(semi_space_size,
|
||||
old_space_size,
|
||||
max_executable_size,
|
||||
code_range_size);
|
||||
|
@ -463,9 +463,9 @@ DEFINE_bool(always_inline_smi_code, false,
|
||||
"always inline smi code in non-opt code")
|
||||
|
||||
// heap.cc
|
||||
DEFINE_int(max_new_space_size, 0,
|
||||
"max size of the new space consisting of two semi-spaces which are half"
|
||||
"the size (in MBytes)")
|
||||
DEFINE_int(max_semi_space_size, 0,
|
||||
"max size of a semi-space (in MBytes), the new space consists of two"
|
||||
"semi-spaces")
|
||||
DEFINE_int(max_old_space_size, 0, "max size of the old space (in Mbytes)")
|
||||
DEFINE_int(max_executable_size, 0, "max size of executable memory (in Mbytes)")
|
||||
DEFINE_bool(gc_global, false, "always perform global GCs")
|
||||
|
79
src/heap.cc
79
src/heap.cc
@ -49,7 +49,7 @@ Heap::Heap()
|
||||
// semispace_size_ should be a power of 2 and old_generation_size_ should be
|
||||
// a multiple of Page::kPageSize.
|
||||
reserved_semispace_size_(8 * (kPointerSize / 4) * MB),
|
||||
max_semispace_size_(8 * (kPointerSize / 4) * MB),
|
||||
max_semi_space_size_(8 * (kPointerSize / 4) * MB),
|
||||
initial_semispace_size_(Page::kPageSize),
|
||||
max_old_generation_size_(700ul * (kPointerSize / 4) * MB),
|
||||
max_executable_size_(256ul * (kPointerSize / 4) * MB),
|
||||
@ -137,7 +137,7 @@ Heap::Heap()
|
||||
// V8 with snapshots and a non-default max semispace size is much
|
||||
// easier if you can define it as part of the build environment.
|
||||
#if defined(V8_MAX_SEMISPACE_SIZE)
|
||||
max_semispace_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE;
|
||||
max_semi_space_size_ = reserved_semispace_size_ = V8_MAX_SEMISPACE_SIZE;
|
||||
#endif
|
||||
|
||||
// Ensure old_generation_size_ is a multiple of kPageSize.
|
||||
@ -3090,7 +3090,7 @@ int Heap::FullSizeNumberStringCacheLength() {
|
||||
// Compute the size of the number string cache based on the max newspace size.
|
||||
// The number string cache has a minimum size based on twice the initial cache
|
||||
// size to ensure that it is bigger after being made 'full size'.
|
||||
int number_string_cache_size = max_semispace_size_ / 512;
|
||||
int number_string_cache_size = max_semi_space_size_ / 512;
|
||||
number_string_cache_size = Max(kInitialNumberStringCacheSize * 2,
|
||||
Min(0x4000, number_string_cache_size));
|
||||
// There is a string and a number per entry so the length is twice the number
|
||||
@ -4979,37 +4979,37 @@ void Heap::IterateStrongRoots(ObjectVisitor* v, VisitMode mode) {
|
||||
// TODO(1236194): Since the heap size is configurable on the command line
|
||||
// and through the API, we should gracefully handle the case that the heap
|
||||
// size is not big enough to fit all the initial objects.
|
||||
bool Heap::ConfigureHeap(int max_semispace_size,
|
||||
intptr_t max_old_space_size,
|
||||
intptr_t max_executable_size,
|
||||
intptr_t code_range_size) {
|
||||
bool Heap::ConfigureHeap(int max_semi_space_size,
|
||||
int max_old_space_size,
|
||||
int max_executable_size,
|
||||
int code_range_size) {
|
||||
if (HasBeenSetUp()) return false;
|
||||
|
||||
// Overwrite default configuration.
|
||||
if (max_semi_space_size > 0) {
|
||||
max_semi_space_size_ = max_semi_space_size * MB;
|
||||
}
|
||||
if (max_old_space_size > 0) {
|
||||
max_old_generation_size_ = max_old_space_size * MB;
|
||||
}
|
||||
if (max_executable_size > 0) {
|
||||
max_executable_size_ = max_executable_size * MB;
|
||||
}
|
||||
|
||||
// If max space size flags are specified overwrite the configuration.
|
||||
if (FLAG_max_new_space_size > 0) {
|
||||
max_semispace_size = (FLAG_max_new_space_size / 2) * kLumpOfMemory;
|
||||
if (FLAG_max_semi_space_size > 0) {
|
||||
max_semi_space_size_ = FLAG_max_semi_space_size * MB;
|
||||
}
|
||||
if (FLAG_max_old_space_size > 0) {
|
||||
max_old_space_size = FLAG_max_old_space_size * kLumpOfMemory;
|
||||
max_old_generation_size_ = FLAG_max_old_space_size * MB;
|
||||
}
|
||||
if (FLAG_max_executable_size > 0) {
|
||||
max_executable_size = FLAG_max_executable_size * kLumpOfMemory;
|
||||
max_executable_size_ = FLAG_max_executable_size * MB;
|
||||
}
|
||||
|
||||
if (FLAG_stress_compaction) {
|
||||
// This will cause more frequent GCs when stressing.
|
||||
max_semispace_size_ = Page::kPageSize;
|
||||
}
|
||||
|
||||
if (max_semispace_size > 0) {
|
||||
if (max_semispace_size < Page::kPageSize) {
|
||||
max_semispace_size = Page::kPageSize;
|
||||
if (FLAG_trace_gc) {
|
||||
PrintPID("Max semispace size cannot be less than %dkbytes\n",
|
||||
Page::kPageSize >> 10);
|
||||
}
|
||||
}
|
||||
max_semispace_size_ = max_semispace_size;
|
||||
max_semi_space_size_ = Page::kPageSize;
|
||||
}
|
||||
|
||||
if (Snapshot::IsEnabled()) {
|
||||
@ -5018,8 +5018,8 @@ bool Heap::ConfigureHeap(int max_semispace_size,
|
||||
// write-barrier code that relies on the size and alignment of new
|
||||
// space. We therefore cannot use a larger max semispace size
|
||||
// than the default reserved semispace size.
|
||||
if (max_semispace_size_ > reserved_semispace_size_) {
|
||||
max_semispace_size_ = reserved_semispace_size_;
|
||||
if (max_semi_space_size_ > reserved_semispace_size_) {
|
||||
max_semi_space_size_ = reserved_semispace_size_;
|
||||
if (FLAG_trace_gc) {
|
||||
PrintPID("Max semispace size cannot be more than %dkbytes\n",
|
||||
reserved_semispace_size_ >> 10);
|
||||
@ -5028,12 +5028,7 @@ bool Heap::ConfigureHeap(int max_semispace_size,
|
||||
} else {
|
||||
// If we are not using snapshots we reserve space for the actual
|
||||
// max semispace size.
|
||||
reserved_semispace_size_ = max_semispace_size_;
|
||||
}
|
||||
|
||||
if (max_old_space_size > 0) max_old_generation_size_ = max_old_space_size;
|
||||
if (max_executable_size > 0) {
|
||||
max_executable_size_ = RoundUp(max_executable_size, Page::kPageSize);
|
||||
reserved_semispace_size_ = max_semi_space_size_;
|
||||
}
|
||||
|
||||
// The max executable size must be less than or equal to the max old
|
||||
@ -5044,22 +5039,21 @@ bool Heap::ConfigureHeap(int max_semispace_size,
|
||||
|
||||
// The new space size must be a power of two to support single-bit testing
|
||||
// for containment.
|
||||
max_semispace_size_ = RoundUpToPowerOf2(max_semispace_size_);
|
||||
max_semi_space_size_ = RoundUpToPowerOf2(max_semi_space_size_);
|
||||
reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_);
|
||||
initial_semispace_size_ = Min(initial_semispace_size_, max_semispace_size_);
|
||||
initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_);
|
||||
|
||||
// The external allocation limit should be below 256 MB on all architectures
|
||||
// to avoid unnecessary low memory notifications, as that is the threshold
|
||||
// for some embedders.
|
||||
external_allocation_limit_ = 12 * max_semispace_size_;
|
||||
external_allocation_limit_ = 12 * max_semi_space_size_;
|
||||
ASSERT(external_allocation_limit_ <= 256 * MB);
|
||||
|
||||
// The old generation is paged and needs at least one page for each space.
|
||||
int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
|
||||
max_old_generation_size_ = Max(static_cast<intptr_t>(paged_space_count *
|
||||
Page::kPageSize),
|
||||
RoundUp(max_old_generation_size_,
|
||||
Page::kPageSize));
|
||||
max_old_generation_size_ =
|
||||
Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize),
|
||||
max_old_generation_size_);
|
||||
|
||||
// We rely on being able to allocate new arrays in paged spaces.
|
||||
ASSERT(Page::kMaxRegularHeapObjectSize >=
|
||||
@ -5067,7 +5061,7 @@ bool Heap::ConfigureHeap(int max_semispace_size,
|
||||
FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) +
|
||||
AllocationMemento::kSize));
|
||||
|
||||
code_range_size_ = code_range_size;
|
||||
code_range_size_ = code_range_size * MB;
|
||||
|
||||
// We set the old generation growing factor to 2 to grow the heap slower on
|
||||
// memory-constrained devices.
|
||||
@ -5081,10 +5075,7 @@ bool Heap::ConfigureHeap(int max_semispace_size,
|
||||
|
||||
|
||||
bool Heap::ConfigureHeapDefault() {
|
||||
return ConfigureHeap(static_cast<intptr_t>(FLAG_max_new_space_size / 2) * KB,
|
||||
static_cast<intptr_t>(FLAG_max_old_space_size) * MB,
|
||||
static_cast<intptr_t>(FLAG_max_executable_size) * MB,
|
||||
static_cast<intptr_t>(0));
|
||||
return ConfigureHeap(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
|
||||
@ -5207,7 +5198,7 @@ bool Heap::SetUp() {
|
||||
return false;
|
||||
|
||||
// Set up new space.
|
||||
if (!new_space_.SetUp(reserved_semispace_size_, max_semispace_size_)) {
|
||||
if (!new_space_.SetUp(reserved_semispace_size_, max_semi_space_size_)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
56
src/heap.h
56
src/heap.h
@ -546,12 +546,12 @@ enum ArrayStorageAllocationMode {
|
||||
|
||||
class Heap {
|
||||
public:
|
||||
// Configure heap size before setup. Return false if the heap has been
|
||||
// Configure heap size in MB before setup. Return false if the heap has been
|
||||
// set up already.
|
||||
bool ConfigureHeap(int max_semispace_size,
|
||||
intptr_t max_old_space_size,
|
||||
intptr_t max_executable_size,
|
||||
intptr_t code_range_size);
|
||||
bool ConfigureHeap(int max_semi_space_size,
|
||||
int max_old_space_size,
|
||||
int max_executable_size,
|
||||
int code_range_size);
|
||||
bool ConfigureHeapDefault();
|
||||
|
||||
// Prepares the heap, setting up memory areas that are needed in the isolate
|
||||
@ -581,7 +581,7 @@ class Heap {
|
||||
intptr_t MaxReserved() {
|
||||
return 4 * reserved_semispace_size_ + max_old_generation_size_;
|
||||
}
|
||||
int MaxSemiSpaceSize() { return max_semispace_size_; }
|
||||
int MaxSemiSpaceSize() { return max_semi_space_size_; }
|
||||
int ReservedSemiSpaceSize() { return reserved_semispace_size_; }
|
||||
int InitialSemiSpaceSize() { return initial_semispace_size_; }
|
||||
intptr_t MaxOldGenerationSize() { return max_old_generation_size_; }
|
||||
@ -1072,25 +1072,39 @@ class Heap {
|
||||
static const intptr_t kMinimumOldGenerationAllocationLimit =
|
||||
8 * (Page::kPageSize > MB ? Page::kPageSize : MB);
|
||||
|
||||
static const int kLumpOfMemory = (i::kPointerSize / 4) * i::MB;
|
||||
static const int kPointerMultiplier = i::kPointerSize / 4;
|
||||
|
||||
// The new space size has to be a power of 2.
|
||||
static const int kMaxNewSpaceSizeLowMemoryDevice = 2 * kLumpOfMemory;
|
||||
static const int kMaxNewSpaceSizeMediumMemoryDevice = 8 * kLumpOfMemory;
|
||||
static const int kMaxNewSpaceSizeHighMemoryDevice = 16 * kLumpOfMemory;
|
||||
static const int kMaxNewSpaceSizeHugeMemoryDevice = 16 * kLumpOfMemory;
|
||||
// The new space size has to be a power of 2. Sizes are in MB.
|
||||
static const int kMaxSemiSpaceSizeLowMemoryDevice =
|
||||
1 * kPointerMultiplier;
|
||||
static const int kMaxSemiSpaceSizeMediumMemoryDevice =
|
||||
4 * kPointerMultiplier;
|
||||
static const int kMaxSemiSpaceSizeHighMemoryDevice =
|
||||
8 * kPointerMultiplier;
|
||||
static const int kMaxSemiSpaceSizeHugeMemoryDevice =
|
||||
8 * kPointerMultiplier;
|
||||
|
||||
// The old space size has to be a multiple of Page::kPageSize.
|
||||
static const int kMaxOldSpaceSizeLowMemoryDevice = 128 * kLumpOfMemory;
|
||||
static const int kMaxOldSpaceSizeMediumMemoryDevice = 256 * kLumpOfMemory;
|
||||
static const int kMaxOldSpaceSizeHighMemoryDevice = 512 * kLumpOfMemory;
|
||||
static const int kMaxOldSpaceSizeHugeMemoryDevice = 700 * kLumpOfMemory;
|
||||
// Sizes are in MB.
|
||||
static const int kMaxOldSpaceSizeLowMemoryDevice =
|
||||
128 * kPointerMultiplier;
|
||||
static const int kMaxOldSpaceSizeMediumMemoryDevice =
|
||||
256 * kPointerMultiplier;
|
||||
static const int kMaxOldSpaceSizeHighMemoryDevice =
|
||||
512 * kPointerMultiplier;
|
||||
static const int kMaxOldSpaceSizeHugeMemoryDevice =
|
||||
700 * kPointerMultiplier;
|
||||
|
||||
// The executable size has to be a multiple of Page::kPageSize.
|
||||
static const int kMaxExecutableSizeLowMemoryDevice = 128 * kLumpOfMemory;
|
||||
static const int kMaxExecutableSizeMediumMemoryDevice = 256 * kLumpOfMemory;
|
||||
static const int kMaxExecutableSizeHighMemoryDevice = 512 * kLumpOfMemory;
|
||||
static const int kMaxExecutableSizeHugeMemoryDevice = 700 * kLumpOfMemory;
|
||||
// Sizes are in MB.
|
||||
static const int kMaxExecutableSizeLowMemoryDevice =
|
||||
128 * kPointerMultiplier;
|
||||
static const int kMaxExecutableSizeMediumMemoryDevice =
|
||||
256 * kPointerMultiplier;
|
||||
static const int kMaxExecutableSizeHighMemoryDevice =
|
||||
512 * kPointerMultiplier;
|
||||
static const int kMaxExecutableSizeHugeMemoryDevice =
|
||||
700 * kPointerMultiplier;
|
||||
|
||||
intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) {
|
||||
intptr_t limit = FLAG_stress_compaction
|
||||
@ -1489,7 +1503,7 @@ class Heap {
|
||||
|
||||
intptr_t code_range_size_;
|
||||
int reserved_semispace_size_;
|
||||
int max_semispace_size_;
|
||||
int max_semi_space_size_;
|
||||
int initial_semispace_size_;
|
||||
intptr_t max_old_generation_size_;
|
||||
intptr_t max_executable_size_;
|
||||
|
@ -2417,7 +2417,7 @@ class NewSpace : public Space {
|
||||
inline_allocation_limit_step_(0) {}
|
||||
|
||||
// Sets up the new space using the given chunk.
|
||||
bool SetUp(int reserved_semispace_size_, int max_semispace_size);
|
||||
bool SetUp(int reserved_semispace_size_, int max_semi_space_size);
|
||||
|
||||
// Tears down the space. Heap memory was not allocated by the space, so it
|
||||
// is not deallocated here.
|
||||
|
@ -99,7 +99,7 @@ void V8::InitializeOncePerProcessImpl() {
|
||||
if (FLAG_stress_compaction) {
|
||||
FLAG_force_marking_deque_overflows = true;
|
||||
FLAG_gc_global = true;
|
||||
FLAG_max_new_space_size = 2 * Page::kPageSize;
|
||||
FLAG_max_semi_space_size = 1;
|
||||
}
|
||||
|
||||
#ifdef V8_USE_DEFAULT_PLATFORM
|
||||
|
@ -19534,10 +19534,9 @@ class InitDefaultIsolateThread : public v8::internal::Thread {
|
||||
isolate->Enter();
|
||||
switch (testCase_) {
|
||||
case SetResourceConstraints: {
|
||||
static const int K = 1024;
|
||||
v8::ResourceConstraints constraints;
|
||||
constraints.set_max_new_space_size(2 * K * K);
|
||||
constraints.set_max_old_space_size(4 * K * K);
|
||||
constraints.set_max_semi_space_size(1);
|
||||
constraints.set_max_old_space_size(4);
|
||||
v8::SetResourceConstraints(CcTest::isolate(), &constraints);
|
||||
break;
|
||||
}
|
||||
|
@ -2208,7 +2208,7 @@ TEST(OptimizedAllocationAlwaysInNewSpace) {
|
||||
|
||||
TEST(OptimizedPretenuringAllocationFolding) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
i::FLAG_allocation_site_pretenuring = false;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
@ -2251,7 +2251,7 @@ TEST(OptimizedPretenuringAllocationFolding) {
|
||||
|
||||
TEST(OptimizedPretenuringAllocationFoldingBlocks) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
i::FLAG_allocation_site_pretenuring = false;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
@ -2294,7 +2294,7 @@ TEST(OptimizedPretenuringAllocationFoldingBlocks) {
|
||||
|
||||
TEST(OptimizedPretenuringObjectArrayLiterals) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
@ -2323,7 +2323,7 @@ TEST(OptimizedPretenuringObjectArrayLiterals) {
|
||||
|
||||
TEST(OptimizedPretenuringMixedInObjectProperties) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
@ -2358,7 +2358,7 @@ TEST(OptimizedPretenuringMixedInObjectProperties) {
|
||||
|
||||
TEST(OptimizedPretenuringDoubleArrayProperties) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
@ -2387,7 +2387,7 @@ TEST(OptimizedPretenuringDoubleArrayProperties) {
|
||||
|
||||
TEST(OptimizedPretenuringdoubleArrayLiterals) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
@ -2416,7 +2416,7 @@ TEST(OptimizedPretenuringdoubleArrayLiterals) {
|
||||
|
||||
TEST(OptimizedPretenuringNestedMixedArrayLiterals) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
@ -2454,7 +2454,7 @@ TEST(OptimizedPretenuringNestedMixedArrayLiterals) {
|
||||
|
||||
TEST(OptimizedPretenuringNestedObjectLiterals) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
@ -2492,7 +2492,7 @@ TEST(OptimizedPretenuringNestedObjectLiterals) {
|
||||
|
||||
TEST(OptimizedPretenuringNestedDoubleLiterals) {
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
@ -2538,7 +2538,7 @@ TEST(OptimizedPretenuringConstructorCalls) {
|
||||
return;
|
||||
}
|
||||
i::FLAG_allow_natives_syntax = true;
|
||||
i::FLAG_max_new_space_size = 2;
|
||||
i::FLAG_max_semi_space_size = 1;
|
||||
CcTest::InitializeVM();
|
||||
if (!CcTest::i_isolate()->use_crankshaft() || i::FLAG_always_opt) return;
|
||||
if (i::FLAG_gc_global || i::FLAG_stress_compaction) return;
|
||||
|
@ -77,7 +77,7 @@ TEST(MarkingDeque) {
|
||||
TEST(Promotion) {
|
||||
CcTest::InitializeVM();
|
||||
TestHeap* heap = CcTest::test_heap();
|
||||
heap->ConfigureHeap(2*256*KB, 1*MB, 1*MB, 0);
|
||||
heap->ConfigureHeap(1, 1, 1, 0);
|
||||
|
||||
v8::HandleScope sc(CcTest::isolate());
|
||||
|
||||
@ -102,7 +102,7 @@ TEST(Promotion) {
|
||||
TEST(NoPromotion) {
|
||||
CcTest::InitializeVM();
|
||||
TestHeap* heap = CcTest::test_heap();
|
||||
heap->ConfigureHeap(2*256*KB, 1*MB, 1*MB, 0);
|
||||
heap->ConfigureHeap(1, 1, 1, 0);
|
||||
|
||||
v8::HandleScope sc(CcTest::isolate());
|
||||
|
||||
|
@ -1201,10 +1201,9 @@ TEST(SliceFromSlice) {
|
||||
|
||||
TEST(AsciiArrayJoin) {
|
||||
// Set heap limits.
|
||||
static const int K = 1024;
|
||||
v8::ResourceConstraints constraints;
|
||||
constraints.set_max_new_space_size(2 * K * K);
|
||||
constraints.set_max_old_space_size(4 * K * K);
|
||||
constraints.set_max_semi_space_size(1);
|
||||
constraints.set_max_old_space_size(4);
|
||||
v8::SetResourceConstraints(CcTest::isolate(), &constraints);
|
||||
|
||||
// String s is made of 2^17 = 131072 'c' characters and a is an array
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --noopt
|
||||
// Flags: --max-semi-space-size=1 --noopt
|
||||
|
||||
// Check that a mod where the stub code hits a failure in heap number
|
||||
// allocation still works.
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --allow-natives-syntax
|
||||
// Flags: --max-semi-space-size=1 --allow-natives-syntax
|
||||
|
||||
// Test inlining of Math.floor when assigned to a global.
|
||||
var flo = Math.floor;
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --allow-natives-syntax
|
||||
// Flags: --max-semi-space-size=1 --allow-natives-syntax
|
||||
|
||||
// Test inlining of Math.floor when assigned to a local.
|
||||
var test_id = 0;
|
||||
|
@ -26,7 +26,7 @@
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Tests the handling of GC issues in the defineProperty method.
|
||||
// Flags: --max-new-space-size=2
|
||||
// Flags: --max-semi-space-size=1
|
||||
|
||||
function Regular() {
|
||||
this[0] = 0;
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --allow-natives-syntax
|
||||
// Flags: --max-semi-space-size=1 --allow-natives-syntax
|
||||
|
||||
function zero() {
|
||||
var x = 0.5;
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --allow-natives-syntax
|
||||
// Flags: --max-semi-space-size=1 --allow-natives-syntax
|
||||
|
||||
var test_id = 0;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --allow-natives-syntax
|
||||
// Flags: --max-semi-space-size=1 --allow-natives-syntax
|
||||
|
||||
var test_id = 0;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --allow-natives-syntax
|
||||
// Flags: --max-semi-space-size=1 --allow-natives-syntax
|
||||
|
||||
var test_id = 0;
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2 --allow-natives-syntax
|
||||
// Flags: --max-semi-space-size=1 --allow-natives-syntax
|
||||
|
||||
var test_id = 0;
|
||||
|
||||
|
@ -32,7 +32,7 @@
|
||||
// sure that concurrent sweeping, which relies on similar assumptions
|
||||
// as lazy sweeping works correctly.
|
||||
|
||||
// Flags: --expose-gc --noincremental-marking --max-new-space-size=2
|
||||
// Flags: --expose-gc --noincremental-marking --max-semi-space-size=1
|
||||
|
||||
(function() {
|
||||
var head = new Array(1);
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --expose-gc --max-new-space-size=2
|
||||
// Flags: --expose-gc --max-semi-space-size=1
|
||||
|
||||
eval("function Node() { this.a = 1; this.a = 3; }");
|
||||
new Node;
|
||||
|
@ -25,7 +25,7 @@
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
// Flags: --max-new-space-size=2
|
||||
// Flags: --max-semi-space-size=1
|
||||
"use strict";
|
||||
|
||||
// Check for GC bug constructing exceptions.
|
||||
|
Loading…
Reference in New Issue
Block a user