OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_GC_IDLE_TIME_HANDLER_H_ | 5 #ifndef V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
6 #define V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 6 #define V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
7 | 7 |
8 #include "src/globals.h" | 8 #include "src/globals.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // sweeper threads. | 99 // sweeper threads. |
100 static const size_t kMinTimeForFinalizeSweeping; | 100 static const size_t kMinTimeForFinalizeSweeping; |
101 | 101 |
102 // Number of idle mark-compact events, after which idle handler will finish | 102 // Number of idle mark-compact events, after which idle handler will finish |
103 // idle round. | 103 // idle round. |
104 static const int kMaxMarkCompactsInIdleRound; | 104 static const int kMaxMarkCompactsInIdleRound; |
105 | 105 |
106 // Number of scavenges that will trigger start of new idle round. | 106 // Number of scavenges that will trigger start of new idle round. |
107 static const int kIdleScavengeThreshold; | 107 static const int kIdleScavengeThreshold; |
108 | 108 |
109 // Heap size threshold below which we prefer mark-compact over incremental | |
110 // step. | |
111 static const size_t kSmallHeapSize = 4 * kPointerSize * MB; | |
112 | |
113 // That is the maximum idle time we will have during frame rendering. | 109 // That is the maximum idle time we will have during frame rendering. |
114 static const size_t kMaxFrameRenderingIdleTime = 16; | 110 static const size_t kMaxFrameRenderingIdleTime = 16; |
115 | 111 |
116 // If we haven't recorded any scavenger events yet, we use a conservative | 112 // If we haven't recorded any scavenger events yet, we use a conservative |
117 // lower bound for the scavenger speed. | 113 // lower bound for the scavenger speed. |
118 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; | 114 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; |
119 | 115 |
120 // If contexts are disposed at a higher rate a full gc is triggered. | 116 // If contexts are disposed at a higher rate a full gc is triggered. |
121 static const double kHighContextDisposalRate; | 117 static const double kHighContextDisposalRate; |
122 | 118 |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 int mark_compacts_since_idle_round_started_; | 177 int mark_compacts_since_idle_round_started_; |
182 int scavenges_since_last_idle_round_; | 178 int scavenges_since_last_idle_round_; |
183 | 179 |
184 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 180 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
185 }; | 181 }; |
186 | 182 |
187 } // namespace internal | 183 } // namespace internal |
188 } // namespace v8 | 184 } // namespace v8 |
189 | 185 |
190 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 186 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
OLD | NEW |