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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 static const size_t kMaxFrameRenderingIdleTime = 17; | 129 static const size_t kMaxFrameRenderingIdleTime = 17; |
130 | 130 |
131 // We conservatively assume that in the next kTimeUntilNextIdleEvent ms | 131 // We conservatively assume that in the next kTimeUntilNextIdleEvent ms |
132 // no idle notification happens. | 132 // no idle notification happens. |
133 static const size_t kTimeUntilNextIdleEvent = 100; | 133 static const size_t kTimeUntilNextIdleEvent = 100; |
134 | 134 |
135 // If we haven't recorded any scavenger events yet, we use a conservative | 135 // If we haven't recorded any scavenger events yet, we use a conservative |
136 // lower bound for the scavenger speed. | 136 // lower bound for the scavenger speed. |
137 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; | 137 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; |
138 | 138 |
| 139 // The minimum size of allocated new space objects to trigger a scavenge. |
| 140 static const size_t kMinimumNewSpaceSizeToPerformScavenge = MB / 2; |
| 141 |
139 // If contexts are disposed at a higher rate a full gc is triggered. | 142 // If contexts are disposed at a higher rate a full gc is triggered. |
140 static const double kHighContextDisposalRate; | 143 static const double kHighContextDisposalRate; |
141 | 144 |
142 // Incremental marking step time. | 145 // Incremental marking step time. |
143 static const size_t kIncrementalMarkingStepTimeInMs = 1; | 146 static const size_t kIncrementalMarkingStepTimeInMs = 1; |
144 | 147 |
145 static const size_t kMinTimeForOverApproximatingWeakClosureInMs; | 148 static const size_t kMinTimeForOverApproximatingWeakClosureInMs; |
146 | 149 |
147 // The number of idle MarkCompact GCs to perform before transitioning to | 150 // The number of idle MarkCompact GCs to perform before transitioning to |
148 // the kDone mode. | 151 // the kDone mode. |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 | 248 |
246 Mode mode_; | 249 Mode mode_; |
247 | 250 |
248 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 251 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
249 }; | 252 }; |
250 | 253 |
251 } // namespace internal | 254 } // namespace internal |
252 } // namespace v8 | 255 } // namespace v8 |
253 | 256 |
254 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 257 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
OLD | NEW |