Chromium Code Reviews| 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 // idle round. | 115 // idle round. |
| 116 static const int kMaxMarkCompactsInIdleRound; | 116 static const int kMaxMarkCompactsInIdleRound; |
| 117 | 117 |
| 118 // Number of scavenges that will trigger start of new idle round. | 118 // Number of scavenges that will trigger start of new idle round. |
| 119 static const int kIdleScavengeThreshold; | 119 static const int kIdleScavengeThreshold; |
| 120 | 120 |
| 121 // This is the maximum scheduled idle time. Note that it can be more than | 121 // This is the maximum scheduled idle time. Note that it can be more than |
| 122 // 16 ms when there is currently no rendering going on. | 122 // 16 ms when there is currently no rendering going on. |
| 123 static const size_t kMaxScheduledIdleTime = 50; | 123 static const size_t kMaxScheduledIdleTime = 50; |
| 124 | 124 |
| 125 // The maximum idle time when frames are rendered is 16ms. | |
| 126 static const size_t kMaxFrameRenderingIdleTime = 16; | |
|
Erik Corry Chromium.org
2015/04/16 14:16:44
It's 16 and two thirds. I think you should go wit
Hannes Payer (out of office)
2015/04/16 14:46:45
Done.
Erik Corry
2015/04/16 15:35:46
It's actually 16⅔. Should we use 17 here?
| |
| 127 | |
| 125 // We conservatively assume that in the next kTimeUntilNextIdleEvent ms | 128 // We conservatively assume that in the next kTimeUntilNextIdleEvent ms |
| 126 // no idle notification happens. | 129 // no idle notification happens. |
| 127 static const size_t kTimeUntilNextIdleEvent = 100; | 130 static const size_t kTimeUntilNextIdleEvent = 100; |
| 128 | 131 |
| 129 // If we haven't recorded any scavenger events yet, we use a conservative | 132 // If we haven't recorded any scavenger events yet, we use a conservative |
| 130 // lower bound for the scavenger speed. | 133 // lower bound for the scavenger speed. |
| 131 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; | 134 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; |
| 132 | 135 |
| 133 // If contexts are disposed at a higher rate a full gc is triggered. | 136 // If contexts are disposed at a higher rate a full gc is triggered. |
| 134 static const double kHighContextDisposalRate; | 137 static const double kHighContextDisposalRate; |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 228 int scavenges_since_last_idle_round_; | 231 int scavenges_since_last_idle_round_; |
| 229 int idle_times_which_made_no_progress_since_last_idle_round_; | 232 int idle_times_which_made_no_progress_since_last_idle_round_; |
| 230 | 233 |
| 231 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 234 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
| 232 }; | 235 }; |
| 233 | 236 |
| 234 } // namespace internal | 237 } // namespace internal |
| 235 } // namespace v8 | 238 } // namespace v8 |
| 236 | 239 |
| 237 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 240 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| OLD | NEW |