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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 // sweeper threads. | 115 // sweeper threads. |
116 static const size_t kMinTimeForFinalizeSweeping; | 116 static const size_t kMinTimeForFinalizeSweeping; |
117 | 117 |
118 // Number of idle mark-compact events, after which idle handler will finish | 118 // Number of idle mark-compact events, after which idle handler will finish |
119 // idle round. | 119 // idle round. |
120 static const int kMaxMarkCompactsInIdleRound; | 120 static const int kMaxMarkCompactsInIdleRound; |
121 | 121 |
122 // Number of scavenges that will trigger start of new idle round. | 122 // Number of scavenges that will trigger start of new idle round. |
123 static const int kIdleScavengeThreshold; | 123 static const int kIdleScavengeThreshold; |
124 | 124 |
125 // That is the maximum idle time we will have during frame rendering. | 125 // This is the maximum scheduled idle time. Note that it can be more than |
126 static const size_t kMaxFrameRenderingIdleTime = 16; | 126 // 16 ms when there is currently no rendering going on. |
| 127 static const size_t kMaxScheduledIdleTime = 50; |
127 | 128 |
128 // If we haven't recorded any scavenger events yet, we use a conservative | 129 // If we haven't recorded any scavenger events yet, we use a conservative |
129 // lower bound for the scavenger speed. | 130 // lower bound for the scavenger speed. |
130 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; | 131 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; |
131 | 132 |
132 // If contexts are disposed at a higher rate a full gc is triggered. | 133 // If contexts are disposed at a higher rate a full gc is triggered. |
133 static const double kHighContextDisposalRate; | 134 static const double kHighContextDisposalRate; |
134 | 135 |
135 // Incremental marking step time. | 136 // Incremental marking step time. |
136 static const size_t kIncrementalMarkingStepTimeInMs = 1; | 137 static const size_t kIncrementalMarkingStepTimeInMs = 1; |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 int mark_compacts_since_idle_round_started_; | 215 int mark_compacts_since_idle_round_started_; |
215 int scavenges_since_last_idle_round_; | 216 int scavenges_since_last_idle_round_; |
216 | 217 |
217 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 218 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
218 }; | 219 }; |
219 | 220 |
220 } // namespace internal | 221 } // namespace internal |
221 } // namespace v8 | 222 } // namespace v8 |
222 | 223 |
223 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 224 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
OLD | NEW |