Revision: 21220
Author: [email protected]
Date: Fri May 9 12:37:11 2014 UTC
Log: Add flag to set minimum semi-space size.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/279513003
http://code.google.com/p/v8/source/detail?r=21220
Modified:
/branches/bleeding_edge/src/flag-definitions.h
/branches/bleeding_edge/src/heap.cc
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Fri May 9 08:38:27 2014
UTC
+++ /branches/bleeding_edge/src/flag-definitions.h Fri May 9 12:37:11 2014
UTC
@@ -463,6 +463,9 @@
"always inline smi code in non-opt code")
// 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,
"max size of a semi-space (in MBytes), the new space consists of two"
"semi-spaces")
=======================================
--- /branches/bleeding_edge/src/heap.cc Fri May 9 09:13:12 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Fri May 9 12:37:11 2014 UTC
@@ -5018,7 +5018,7 @@
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",
+ PrintPID("Max semi-space size cannot be more than %d kbytes\n",
reserved_semispace_size_ >> 10);
}
}
@@ -5038,6 +5038,20 @@
// for containment.
max_semi_space_size_ = RoundUpToPowerOf2(max_semi_space_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_);
// The external allocation limit should be below 256 MB on all
architectures
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.