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

Side by Side Diff: src/heap.h

Issue 305413002: 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 | « no previous file | src/heap.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 #ifndef V8_HEAP_H_ 5 #ifndef V8_HEAP_H_
6 #define V8_HEAP_H_ 6 #define V8_HEAP_H_
7 7
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 1069 matching lines...) Expand 10 before | Expand all | Expand 10 after
1080 static const int kMaxExecutableSizeLowMemoryDevice = 1080 static const int kMaxExecutableSizeLowMemoryDevice =
1081 128 * kPointerMultiplier; 1081 128 * kPointerMultiplier;
1082 static const int kMaxExecutableSizeMediumMemoryDevice = 1082 static const int kMaxExecutableSizeMediumMemoryDevice =
1083 256 * kPointerMultiplier; 1083 256 * kPointerMultiplier;
1084 static const int kMaxExecutableSizeHighMemoryDevice = 1084 static const int kMaxExecutableSizeHighMemoryDevice =
1085 512 * kPointerMultiplier; 1085 512 * kPointerMultiplier;
1086 static const int kMaxExecutableSizeHugeMemoryDevice = 1086 static const int kMaxExecutableSizeHugeMemoryDevice =
1087 700 * kPointerMultiplier; 1087 700 * kPointerMultiplier;
1088 1088
1089 intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) { 1089 intptr_t OldGenerationAllocationLimit(intptr_t old_gen_size) {
1090 intptr_t limit = FLAG_stress_compaction 1090 intptr_t limit;
1091 ? old_gen_size + old_gen_size / 10 1091 if (FLAG_stress_compaction) {
1092 : old_gen_size * old_space_growing_factor_; 1092 limit = old_gen_size + old_gen_size / 10;
1093 } else if (old_gen_size < max_old_generation_size_/8) {
ulan 2014/06/05 14:13:12 Nit: spaces around "/"
Hannes Payer (out of office) 2014/06/05 14:46:23 Done.
1094 limit = old_gen_size * 4;
1095 } else if (old_gen_size < max_old_generation_size_/4) {
1096 limit = old_gen_size * 1.5;
1097 } else if (old_gen_size < max_old_generation_size_/2) {
1098 limit = old_gen_size * 1.2;
1099 } else {
1100 limit = old_gen_size * 1.1;
1101 }
1102
1093 limit = Max(limit, kMinimumOldGenerationAllocationLimit); 1103 limit = Max(limit, kMinimumOldGenerationAllocationLimit);
1094 limit += new_space_.Capacity(); 1104 limit += new_space_.Capacity();
1095 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2; 1105 intptr_t halfway_to_the_max = (old_gen_size + max_old_generation_size_) / 2;
1096 return Min(limit, halfway_to_the_max); 1106 return Min(limit, halfway_to_the_max);
1097 } 1107 }
1098 1108
1099 // Indicates whether inline bump-pointer allocation has been disabled. 1109 // Indicates whether inline bump-pointer allocation has been disabled.
1100 bool inline_allocation_disabled() { return inline_allocation_disabled_; } 1110 bool inline_allocation_disabled() { return inline_allocation_disabled_; }
1101 1111
1102 // Switch whether inline bump-pointer allocation should be used. 1112 // Switch whether inline bump-pointer allocation should be used.
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
1491 Object* roots_[kRootListLength]; 1501 Object* roots_[kRootListLength];
1492 1502
1493 intptr_t code_range_size_; 1503 intptr_t code_range_size_;
1494 int reserved_semispace_size_; 1504 int reserved_semispace_size_;
1495 int max_semi_space_size_; 1505 int max_semi_space_size_;
1496 int initial_semispace_size_; 1506 int initial_semispace_size_;
1497 intptr_t max_old_generation_size_; 1507 intptr_t max_old_generation_size_;
1498 intptr_t max_executable_size_; 1508 intptr_t max_executable_size_;
1499 intptr_t maximum_committed_; 1509 intptr_t maximum_committed_;
1500 1510
1501 // The old space growing factor is used in the old space heap growing
1502 // strategy. The new old space size is the current old space size times
1503 // old_space_growing_factor_.
1504 int old_space_growing_factor_;
1505
1506 // For keeping track of how much data has survived 1511 // For keeping track of how much data has survived
1507 // scavenge since last new space expansion. 1512 // scavenge since last new space expansion.
1508 int survived_since_last_expansion_; 1513 int survived_since_last_expansion_;
1509 1514
1510 // For keeping track on when to flush RegExp code. 1515 // For keeping track on when to flush RegExp code.
1511 int sweep_generation_; 1516 int sweep_generation_;
1512 1517
1513 int always_allocate_scope_depth_; 1518 int always_allocate_scope_depth_;
1514 int linear_allocation_scope_depth_; 1519 int linear_allocation_scope_depth_;
1515 1520
(...skipping 1244 matching lines...) Expand 10 before | Expand all | Expand 10 after
2760 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. 2765 DisallowHeapAllocation no_allocation; // i.e. no gc allowed.
2761 2766
2762 private: 2767 private:
2763 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 2768 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
2764 }; 2769 };
2765 #endif // DEBUG 2770 #endif // DEBUG
2766 2771
2767 } } // namespace v8::internal 2772 } } // namespace v8::internal
2768 2773
2769 #endif // V8_HEAP_H_ 2774 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698