Revision: 21148
Author:   [email protected]
Date:     Mon May  5 16:33:23 2014 UTC
Log:      FLAG_max_new_space_size is in MB.

Plus, cleanup of the space - generation mess. More to do there...

BUG=
[email protected]

Review URL: https://codereview.chromium.org/268073004
http://code.google.com/p/v8/source/detail?r=21148

Modified:
 /branches/bleeding_edge/src/api.cc
 /branches/bleeding_edge/src/flag-definitions.h
 /branches/bleeding_edge/src/heap.cc
 /branches/bleeding_edge/src/heap.h
 /branches/bleeding_edge/src/v8.cc

=======================================
--- /branches/bleeding_edge/src/api.cc  Fri May  2 19:30:54 2014 UTC
+++ /branches/bleeding_edge/src/api.cc  Mon May  5 16:33:23 2014 UTC
@@ -474,15 +474,15 @@
                             ResourceConstraints* constraints) {
   i::Isolate* isolate = reinterpret_cast<i::Isolate*>(v8_isolate);
   int new_space_size = constraints->max_new_space_size();
-  int old_gen_size = constraints->max_old_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_gen_size != 0 || max_executable_size != 0 || + if (new_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,
-                                                 old_gen_size,
+                                                 old_space_size,
                                                  max_executable_size,
                                                  code_range_size);
     if (!result) return false;
=======================================
--- /branches/bleeding_edge/src/flag-definitions.h Wed Apr 30 07:07:39 2014 UTC +++ /branches/bleeding_edge/src/flag-definitions.h Mon May 5 16:33:23 2014 UTC
@@ -469,8 +469,10 @@
             "always inline smi code in non-opt code")

 // heap.cc
-DEFINE_int(max_new_space_size, 0, "max size of the new generation (in kBytes)") -DEFINE_int(max_old_space_size, 0, "max size of the old generation (in Mbytes)")
+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_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")
 DEFINE_int(gc_interval, -1, "garbage collect after <n> allocations")
=======================================
--- /branches/bleeding_edge/src/heap.cc Mon May  5 07:10:38 2014 UTC
+++ /branches/bleeding_edge/src/heap.cc Mon May  5 16:33:23 2014 UTC
@@ -4980,17 +4980,17 @@
 // 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_gen_size,
+                         intptr_t max_old_space_size,
                          intptr_t max_executable_size,
                          intptr_t code_range_size) {
   if (HasBeenSetUp()) return false;

   // 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 * kLumpOfMemory;
+    max_semispace_size = (FLAG_max_new_space_size / 2) * kLumpOfMemory;
   }
   if (FLAG_max_old_space_size > 0) {
-    max_old_gen_size = FLAG_max_old_space_size * kLumpOfMemory;
+    max_old_space_size = FLAG_max_old_space_size * kLumpOfMemory;
   }
   if (FLAG_max_executable_size > 0) {
     max_executable_size = FLAG_max_executable_size * kLumpOfMemory;
@@ -5031,7 +5031,7 @@
     reserved_semispace_size_ = max_semispace_size_;
   }

-  if (max_old_gen_size > 0) max_old_generation_size_ = max_old_gen_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);
   }
=======================================
--- /branches/bleeding_edge/src/heap.h  Wed Apr 30 17:27:40 2014 UTC
+++ /branches/bleeding_edge/src/heap.h  Mon May  5 16:33:23 2014 UTC
@@ -549,7 +549,7 @@
   // Configure heap size before setup. Return false if the heap has been
   // set up already.
   bool ConfigureHeap(int max_semispace_size,
-                     intptr_t max_old_gen_size,
+                     intptr_t max_old_space_size,
                      intptr_t max_executable_size,
                      intptr_t code_range_size);
   bool ConfigureHeapDefault();
=======================================
--- /branches/bleeding_edge/src/v8.cc   Fri May  2 19:30:54 2014 UTC
+++ /branches/bleeding_edge/src/v8.cc   Mon May  5 16:33:23 2014 UTC
@@ -99,7 +99,7 @@
   if (FLAG_stress_compaction) {
     FLAG_force_marking_deque_overflows = true;
     FLAG_gc_global = true;
-    FLAG_max_new_space_size = (1 << (kPageSizeBits - 10)) * 2;
+    FLAG_max_new_space_size = 2 * Page::kPageSize;
   }

 #ifdef V8_USE_DEFAULT_PLATFORM

--
--
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.

Reply via email to