| 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 |
| 116 static const size_t kMinTimeForOverApproximatingWeakClosureInMs; | 120 static const size_t kMinTimeForOverApproximatingWeakClosureInMs; |
| 117 | 121 |
| 118 // Number of times we will return a Nothing action in the current mode | 122 // Number of times we will return a Nothing action in the current mode |
| 119 // despite having idle time available before we returning a Done action to | 123 // despite having idle time available before we returning a Done action to |
| 120 // ensure we don't keep scheduling idle tasks and making no progress. | 124 // ensure we don't keep scheduling idle tasks and making no progress. |
| 121 static const int kMaxNoProgressIdleTimes = 10; | 125 static const int kMaxNoProgressIdleTimes = 10; |
| 122 | 126 |
| 123 GCIdleTimeHandler() : idle_times_which_made_no_progress_(0) {} | 127 GCIdleTimeHandler() : idle_times_which_made_no_progress_(0) {} |
| 124 | 128 |
| 125 GCIdleTimeAction Compute(double idle_time_in_ms, | 129 GCIdleTimeAction Compute(double idle_time_in_ms, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 148 // Idle notifications with no progress. | 152 // Idle notifications with no progress. |
| 149 int idle_times_which_made_no_progress_; | 153 int idle_times_which_made_no_progress_; |
| 150 | 154 |
| 151 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 155 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
| 152 }; | 156 }; |
| 153 | 157 |
| 154 } // namespace internal | 158 } // namespace internal |
| 155 } // namespace v8 | 159 } // namespace v8 |
| 156 | 160 |
| 157 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 161 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| OLD | NEW |