Add flag to set minimum semi-space size.
BUG= R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/279513003 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@21220 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2c3ba95841
commit
e82b4cdc40
@ -463,6 +463,9 @@ DEFINE_bool(always_inline_smi_code, false,
|
|||||||
"always inline smi code in non-opt code")
|
"always inline smi code in non-opt code")
|
||||||
|
|
||||||
// heap.cc
|
// heap.cc
|
||||||
|
DEFINE_int(min_semi_space_size, 0,
|
||||||
|
"min size of a semi-space (in MBytes), the new space consists of two"
|
||||||
|
"semi-spaces")
|
||||||
DEFINE_int(max_semi_space_size, 0,
|
DEFINE_int(max_semi_space_size, 0,
|
||||||
"max size of a semi-space (in MBytes), the new space consists of two"
|
"max size of a semi-space (in MBytes), the new space consists of two"
|
||||||
"semi-spaces")
|
"semi-spaces")
|
||||||
|
16
src/heap.cc
16
src/heap.cc
@ -5018,7 +5018,7 @@ bool Heap::ConfigureHeap(int max_semi_space_size,
|
|||||||
if (max_semi_space_size_ > reserved_semispace_size_) {
|
if (max_semi_space_size_ > reserved_semispace_size_) {
|
||||||
max_semi_space_size_ = reserved_semispace_size_;
|
max_semi_space_size_ = reserved_semispace_size_;
|
||||||
if (FLAG_trace_gc) {
|
if (FLAG_trace_gc) {
|
||||||
PrintPID("Max semispace size cannot be more than %dkbytes\n",
|
PrintPID("Max semi-space size cannot be more than %d kbytes\n",
|
||||||
reserved_semispace_size_ >> 10);
|
reserved_semispace_size_ >> 10);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -5038,6 +5038,20 @@ bool Heap::ConfigureHeap(int max_semi_space_size,
|
|||||||
// for containment.
|
// for containment.
|
||||||
max_semi_space_size_ = RoundUpToPowerOf2(max_semi_space_size_);
|
max_semi_space_size_ = RoundUpToPowerOf2(max_semi_space_size_);
|
||||||
reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_);
|
reserved_semispace_size_ = RoundUpToPowerOf2(reserved_semispace_size_);
|
||||||
|
|
||||||
|
if (FLAG_min_semi_space_size > 0) {
|
||||||
|
int initial_semispace_size = FLAG_min_semi_space_size * MB;
|
||||||
|
if (initial_semispace_size > max_semi_space_size_) {
|
||||||
|
initial_semispace_size_ = max_semi_space_size_;
|
||||||
|
if (FLAG_trace_gc) {
|
||||||
|
PrintPID("Min semi-space size cannot be more than the maximum"
|
||||||
|
"semi-space size of %d MB\n", max_semi_space_size_);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
initial_semispace_size_ = initial_semispace_size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_);
|
initial_semispace_size_ = Min(initial_semispace_size_, max_semi_space_size_);
|
||||||
|
|
||||||
// The external allocation limit should be below 256 MB on all architectures
|
// The external allocation limit should be below 256 MB on all architectures
|
||||||
|
Loading…
Reference in New Issue
Block a user