Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(411)

Side by Side Diff: src/heap/heap.cc

Issue 753513002: Introduce a flag to change the new space growth factor (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 5041 matching lines...) Expand 10 before | Expand all | Expand 10 after
5052 "semi-space size of %d MB\n", 5052 "semi-space size of %d MB\n",
5053 max_semi_space_size_ / MB); 5053 max_semi_space_size_ / MB);
5054 } 5054 }
5055 } else { 5055 } else {
5056 target_semispace_size_ = target_semispace_size; 5056 target_semispace_size_ = target_semispace_size;
5057 } 5057 }
5058 } 5058 }
5059 5059
5060 target_semispace_size_ = Max(initial_semispace_size_, target_semispace_size_); 5060 target_semispace_size_ = Max(initial_semispace_size_, target_semispace_size_);
5061 5061
5062 if (FLAG_semi_space_growth_factor < 2) {
5063 FLAG_semi_space_growth_factor = 2;
5064 }
5065
5062 // The old generation is paged and needs at least one page for each space. 5066 // The old generation is paged and needs at least one page for each space.
5063 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1; 5067 int paged_space_count = LAST_PAGED_SPACE - FIRST_PAGED_SPACE + 1;
5064 max_old_generation_size_ = 5068 max_old_generation_size_ =
5065 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize), 5069 Max(static_cast<intptr_t>(paged_space_count * Page::kPageSize),
5066 max_old_generation_size_); 5070 max_old_generation_size_);
5067 5071
5068 // We rely on being able to allocate new arrays in paged spaces. 5072 // We rely on being able to allocate new arrays in paged spaces.
5069 DCHECK(Page::kMaxRegularHeapObjectSize >= 5073 DCHECK(Page::kMaxRegularHeapObjectSize >=
5070 (JSArray::kSize + 5074 (JSArray::kSize +
5071 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + 5075 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) +
(...skipping 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after
6308 static_cast<int>(object_sizes_last_time_[index])); 6312 static_cast<int>(object_sizes_last_time_[index]));
6309 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6313 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6310 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6314 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6311 6315
6312 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6316 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6313 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6317 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6314 ClearObjectStats(); 6318 ClearObjectStats();
6315 } 6319 }
6316 } 6320 }
6317 } // namespace v8::internal 6321 } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698