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

Side by Side Diff: src/heap.cc

Issue 324403008: Grow big old generation slower. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months 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 | Annotate | Revision Log
« no previous file with comments | « src/heap.h ('k') | no next file » | 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/once.h" 9 #include "src/base/once.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 reserved_semispace_size_(8 * (kPointerSize / 4) * MB), 53 reserved_semispace_size_(8 * (kPointerSize / 4) * MB),
54 max_semi_space_size_(8 * (kPointerSize / 4) * MB), 54 max_semi_space_size_(8 * (kPointerSize / 4) * MB),
55 initial_semispace_size_(Page::kPageSize), 55 initial_semispace_size_(Page::kPageSize),
56 max_old_generation_size_(700ul * (kPointerSize / 4) * MB), 56 max_old_generation_size_(700ul * (kPointerSize / 4) * MB),
57 max_executable_size_(256ul * (kPointerSize / 4) * MB), 57 max_executable_size_(256ul * (kPointerSize / 4) * MB),
58 // Variables set based on semispace_size_ and old_generation_size_ in 58 // Variables set based on semispace_size_ and old_generation_size_ in
59 // ConfigureHeap. 59 // ConfigureHeap.
60 // Will be 4 * reserved_semispace_size_ to ensure that young 60 // Will be 4 * reserved_semispace_size_ to ensure that young
61 // generation can be aligned to its size. 61 // generation can be aligned to its size.
62 maximum_committed_(0), 62 maximum_committed_(0),
63 old_space_growing_factor_(4),
64 survived_since_last_expansion_(0), 63 survived_since_last_expansion_(0),
65 sweep_generation_(0), 64 sweep_generation_(0),
66 always_allocate_scope_depth_(0), 65 always_allocate_scope_depth_(0),
67 linear_allocation_scope_depth_(0), 66 linear_allocation_scope_depth_(0),
68 contexts_disposed_(0), 67 contexts_disposed_(0),
69 global_ic_age_(0), 68 global_ic_age_(0),
70 flush_monomorphic_ics_(false), 69 flush_monomorphic_ics_(false),
71 scan_on_scavenge_pages_(0), 70 scan_on_scavenge_pages_(0),
72 new_space_(this), 71 new_space_(this),
73 old_pointer_space_(NULL), 72 old_pointer_space_(NULL),
(...skipping 4942 matching lines...) Expand 10 before | Expand all | Expand 10 after
5016 max_old_generation_size_); 5015 max_old_generation_size_);
5017 5016
5018 // We rely on being able to allocate new arrays in paged spaces. 5017 // We rely on being able to allocate new arrays in paged spaces.
5019 ASSERT(Page::kMaxRegularHeapObjectSize >= 5018 ASSERT(Page::kMaxRegularHeapObjectSize >=
5020 (JSArray::kSize + 5019 (JSArray::kSize +
5021 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) + 5020 FixedArray::SizeFor(JSObject::kInitialMaxFastElementArray) +
5022 AllocationMemento::kSize)); 5021 AllocationMemento::kSize));
5023 5022
5024 code_range_size_ = code_range_size * MB; 5023 code_range_size_ = code_range_size * MB;
5025 5024
5026 // We set the old generation growing factor to 2 to grow the heap slower on
5027 // memory-constrained devices.
5028 if (max_old_generation_size_ <= kMaxOldSpaceSizeMediumMemoryDevice) {
5029 old_space_growing_factor_ = 2;
5030 }
5031
5032 configured_ = true; 5025 configured_ = true;
5033 return true; 5026 return true;
5034 } 5027 }
5035 5028
5036 5029
5037 bool Heap::ConfigureHeapDefault() { 5030 bool Heap::ConfigureHeapDefault() {
5038 return ConfigureHeap(0, 0, 0, 0); 5031 return ConfigureHeap(0, 0, 0, 0);
5039 } 5032 }
5040 5033
5041 5034
(...skipping 1388 matching lines...) Expand 10 before | Expand all | Expand 10 after
6430 static_cast<int>(object_sizes_last_time_[index])); 6423 static_cast<int>(object_sizes_last_time_[index]));
6431 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) 6424 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT)
6432 #undef ADJUST_LAST_TIME_OBJECT_COUNT 6425 #undef ADJUST_LAST_TIME_OBJECT_COUNT
6433 6426
6434 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); 6427 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_));
6435 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); 6428 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_));
6436 ClearObjectStats(); 6429 ClearObjectStats();
6437 } 6430 }
6438 6431
6439 } } // namespace v8::internal 6432 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698