| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 // That is the maximum idle time we will have during frame rendering. |
| 126 static const size_t kMaxFrameRenderingIdleTime = 16; | 126 static const size_t kMaxFrameRenderingIdleTime = 16; |
| 127 | 127 |
| 128 // Minimum idle time to start incremental marking. |
| 129 static const size_t kMinIdleTimeToStartIncrementalMarking = 10; |
| 130 |
| 128 // If we haven't recorded any scavenger events yet, we use a conservative | 131 // If we haven't recorded any scavenger events yet, we use a conservative |
| 129 // lower bound for the scavenger speed. | 132 // lower bound for the scavenger speed. |
| 130 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; | 133 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; |
| 131 | 134 |
| 132 // If contexts are disposed at a higher rate a full gc is triggered. | 135 // If contexts are disposed at a higher rate a full gc is triggered. |
| 133 static const double kHighContextDisposalRate; | 136 static const double kHighContextDisposalRate; |
| 134 | 137 |
| 135 // Incremental marking step time. | 138 // Incremental marking step time. |
| 136 static const size_t kIncrementalMarkingStepTimeInMs = 1; | 139 static const size_t kIncrementalMarkingStepTimeInMs = 1; |
| 137 | 140 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 int mark_compacts_since_idle_round_started_; | 213 int mark_compacts_since_idle_round_started_; |
| 211 int scavenges_since_last_idle_round_; | 214 int scavenges_since_last_idle_round_; |
| 212 | 215 |
| 213 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 216 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
| 214 }; | 217 }; |
| 215 | 218 |
| 216 } // namespace internal | 219 } // namespace internal |
| 217 } // namespace v8 | 220 } // namespace v8 |
| 218 | 221 |
| 219 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 222 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| OLD | NEW |