| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 // An allocation throughput below kLowAllocationThroughput bytes/ms is | 106 // An allocation throughput below kLowAllocationThroughput bytes/ms is |
| 107 // considered low | 107 // considered low |
| 108 static const size_t kLowAllocationThroughput = 1000; | 108 static const size_t kLowAllocationThroughput = 1000; |
| 109 | 109 |
| 110 // If contexts are disposed at a higher rate a full gc is triggered. | 110 // If contexts are disposed at a higher rate a full gc is triggered. |
| 111 static const double kHighContextDisposalRate; | 111 static const double kHighContextDisposalRate; |
| 112 | 112 |
| 113 // Incremental marking step time. | 113 // Incremental marking step time. |
| 114 static const size_t kIncrementalMarkingStepTimeInMs = 1; | 114 static const size_t kIncrementalMarkingStepTimeInMs = 1; |
| 115 | 115 |
| 116 // Minimum incremental marking step time. | |
| 117 static const size_t kMinIncrementalMarkingStepTimeInMs = | |
| 118 kIncrementalMarkingStepTimeInMs + 1; | |
| 119 | |
| 120 static const size_t kMinTimeForOverApproximatingWeakClosureInMs; | 116 static const size_t kMinTimeForOverApproximatingWeakClosureInMs; |
| 121 | 117 |
| 122 // Number of times we will return a Nothing action in the current mode | 118 // Number of times we will return a Nothing action in the current mode |
| 123 // despite having idle time available before we returning a Done action to | 119 // despite having idle time available before we returning a Done action to |
| 124 // ensure we don't keep scheduling idle tasks and making no progress. | 120 // ensure we don't keep scheduling idle tasks and making no progress. |
| 125 static const int kMaxNoProgressIdleTimes = 10; | 121 static const int kMaxNoProgressIdleTimes = 10; |
| 126 | 122 |
| 127 GCIdleTimeHandler() : idle_times_which_made_no_progress_(0) {} | 123 GCIdleTimeHandler() : idle_times_which_made_no_progress_(0) {} |
| 128 | 124 |
| 129 GCIdleTimeAction Compute(double idle_time_in_ms, | 125 GCIdleTimeAction Compute(double idle_time_in_ms, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 152 // Idle notifications with no progress. | 148 // Idle notifications with no progress. |
| 153 int idle_times_which_made_no_progress_; | 149 int idle_times_which_made_no_progress_; |
| 154 | 150 |
| 155 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 151 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
| 156 }; | 152 }; |
| 157 | 153 |
| 158 } // namespace internal | 154 } // namespace internal |
| 159 } // namespace v8 | 155 } // namespace v8 |
| 160 | 156 |
| 161 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 157 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| OLD | NEW |