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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 // idle round. | 103 // idle round. |
104 static const int kMaxMarkCompactsInIdleRound; | 104 static const int kMaxMarkCompactsInIdleRound; |
105 | 105 |
106 // Number of scavenges that will trigger start of new idle round. | 106 // Number of scavenges that will trigger start of new idle round. |
107 static const int kIdleScavengeThreshold; | 107 static const int kIdleScavengeThreshold; |
108 | 108 |
109 // Heap size threshold below which we prefer mark-compact over incremental | 109 // Heap size threshold below which we prefer mark-compact over incremental |
110 // step. | 110 // step. |
111 static const size_t kSmallHeapSize = 2 * kPointerSize * MB; | 111 static const size_t kSmallHeapSize = 2 * kPointerSize * MB; |
112 | 112 |
| 113 // That is the maximum idle time we will have during frame rendering. |
| 114 static const size_t kMaxFrameRenderingIdleTime = 16; |
| 115 |
113 struct HeapState { | 116 struct HeapState { |
114 int contexts_disposed; | 117 int contexts_disposed; |
115 size_t size_of_objects; | 118 size_t size_of_objects; |
116 bool incremental_marking_stopped; | 119 bool incremental_marking_stopped; |
117 bool can_start_incremental_marking; | 120 bool can_start_incremental_marking; |
118 bool sweeping_in_progress; | 121 bool sweeping_in_progress; |
119 size_t mark_compact_speed_in_bytes_per_ms; | 122 size_t mark_compact_speed_in_bytes_per_ms; |
120 size_t incremental_marking_speed_in_bytes_per_ms; | 123 size_t incremental_marking_speed_in_bytes_per_ms; |
121 }; | 124 }; |
122 | 125 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
157 int mark_compacts_since_idle_round_started_; | 160 int mark_compacts_since_idle_round_started_; |
158 int scavenges_since_last_idle_round_; | 161 int scavenges_since_last_idle_round_; |
159 | 162 |
160 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 163 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
161 }; | 164 }; |
162 | 165 |
163 } // namespace internal | 166 } // namespace internal |
164 } // namespace v8 | 167 } // namespace v8 |
165 | 168 |
166 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 169 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
OLD | NEW |