| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 static const size_t kInitialConservativeFinalIncrementalMarkCompactSpeed = | 104 static const size_t kInitialConservativeFinalIncrementalMarkCompactSpeed = |
| 105 2 * MB; | 105 2 * MB; |
| 106 | 106 |
| 107 // Maximum mark-compact time returned by EstimateMarkCompactTime. | 107 // Maximum mark-compact time returned by EstimateMarkCompactTime. |
| 108 static const size_t kMaxMarkCompactTimeInMs; | 108 static const size_t kMaxMarkCompactTimeInMs; |
| 109 | 109 |
| 110 // Maximum final incremental mark-compact time returned by | 110 // Maximum final incremental mark-compact time returned by |
| 111 // EstimateFinalIncrementalMarkCompactTime. | 111 // EstimateFinalIncrementalMarkCompactTime. |
| 112 static const size_t kMaxFinalIncrementalMarkCompactTimeInMs; | 112 static const size_t kMaxFinalIncrementalMarkCompactTimeInMs; |
| 113 | 113 |
| 114 // Minimum time to finalize sweeping phase. The main thread may wait for | |
| 115 // sweeper threads. | |
| 116 static const size_t kMinTimeForFinalizeSweeping; | |
| 117 | |
| 118 // Number of idle mark-compact events, after which idle handler will finish | 114 // Number of idle mark-compact events, after which idle handler will finish |
| 119 // idle round. | 115 // idle round. |
| 120 static const int kMaxMarkCompactsInIdleRound; | 116 static const int kMaxMarkCompactsInIdleRound; |
| 121 | 117 |
| 122 // Number of scavenges that will trigger start of new idle round. | 118 // Number of scavenges that will trigger start of new idle round. |
| 123 static const int kIdleScavengeThreshold; | 119 static const int kIdleScavengeThreshold; |
| 124 | 120 |
| 125 // 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 |
| 126 // 16 ms when there is currently no rendering going on. | 122 // 16 ms when there is currently no rendering going on. |
| 127 static const size_t kMaxScheduledIdleTime = 50; | 123 static const size_t kMaxScheduledIdleTime = 50; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 141 class HeapState { | 137 class HeapState { |
| 142 public: | 138 public: |
| 143 void Print(); | 139 void Print(); |
| 144 | 140 |
| 145 int contexts_disposed; | 141 int contexts_disposed; |
| 146 double contexts_disposal_rate; | 142 double contexts_disposal_rate; |
| 147 size_t size_of_objects; | 143 size_t size_of_objects; |
| 148 bool incremental_marking_stopped; | 144 bool incremental_marking_stopped; |
| 149 bool can_start_incremental_marking; | 145 bool can_start_incremental_marking; |
| 150 bool sweeping_in_progress; | 146 bool sweeping_in_progress; |
| 147 bool sweeping_completed; |
| 151 size_t mark_compact_speed_in_bytes_per_ms; | 148 size_t mark_compact_speed_in_bytes_per_ms; |
| 152 size_t incremental_marking_speed_in_bytes_per_ms; | 149 size_t incremental_marking_speed_in_bytes_per_ms; |
| 153 size_t final_incremental_mark_compact_speed_in_bytes_per_ms; | 150 size_t final_incremental_mark_compact_speed_in_bytes_per_ms; |
| 154 size_t scavenge_speed_in_bytes_per_ms; | 151 size_t scavenge_speed_in_bytes_per_ms; |
| 155 size_t used_new_space_size; | 152 size_t used_new_space_size; |
| 156 size_t new_space_capacity; | 153 size_t new_space_capacity; |
| 157 size_t new_space_allocation_throughput_in_bytes_per_ms; | 154 size_t new_space_allocation_throughput_in_bytes_per_ms; |
| 158 }; | 155 }; |
| 159 | 156 |
| 160 GCIdleTimeHandler() | 157 GCIdleTimeHandler() |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 int mark_compacts_since_idle_round_started_; | 212 int mark_compacts_since_idle_round_started_; |
| 216 int scavenges_since_last_idle_round_; | 213 int scavenges_since_last_idle_round_; |
| 217 | 214 |
| 218 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 215 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
| 219 }; | 216 }; |
| 220 | 217 |
| 221 } // namespace internal | 218 } // namespace internal |
| 222 } // namespace v8 | 219 } // namespace v8 |
| 223 | 220 |
| 224 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 221 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
| OLD | NEW |