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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 // step. | 110 // step. |
111 static const size_t kSmallHeapSize = 4 * kPointerSize * MB; | 111 static const size_t kSmallHeapSize = 4 * kPointerSize * MB; |
112 | 112 |
113 // That is the maximum idle time we will have during frame rendering. | 113 // That is the maximum idle time we will have during frame rendering. |
114 static const size_t kMaxFrameRenderingIdleTime = 16; | 114 static const size_t kMaxFrameRenderingIdleTime = 16; |
115 | 115 |
116 // If we haven't recorded any scavenger events yet, we use a conservative | 116 // If we haven't recorded any scavenger events yet, we use a conservative |
117 // lower bound for the scavenger speed. | 117 // lower bound for the scavenger speed. |
118 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; | 118 static const size_t kInitialConservativeScavengeSpeed = 100 * KB; |
119 | 119 |
| 120 // If contexts are disposed at a higher rate a full gc is triggered. |
| 121 static const double kHighContextDisposalRate; |
| 122 |
120 struct HeapState { | 123 struct HeapState { |
121 int contexts_disposed; | 124 int contexts_disposed; |
| 125 double contexts_disposal_rate; |
122 size_t size_of_objects; | 126 size_t size_of_objects; |
123 bool incremental_marking_stopped; | 127 bool incremental_marking_stopped; |
124 bool can_start_incremental_marking; | 128 bool can_start_incremental_marking; |
125 bool sweeping_in_progress; | 129 bool sweeping_in_progress; |
126 size_t mark_compact_speed_in_bytes_per_ms; | 130 size_t mark_compact_speed_in_bytes_per_ms; |
127 size_t incremental_marking_speed_in_bytes_per_ms; | 131 size_t incremental_marking_speed_in_bytes_per_ms; |
128 size_t scavenge_speed_in_bytes_per_ms; | 132 size_t scavenge_speed_in_bytes_per_ms; |
129 size_t used_new_space_size; | 133 size_t used_new_space_size; |
130 size_t new_space_capacity; | 134 size_t new_space_capacity; |
131 size_t new_space_allocation_throughput_in_bytes_per_ms; | 135 size_t new_space_allocation_throughput_in_bytes_per_ms; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 int mark_compacts_since_idle_round_started_; | 181 int mark_compacts_since_idle_round_started_; |
178 int scavenges_since_last_idle_round_; | 182 int scavenges_since_last_idle_round_; |
179 | 183 |
180 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); | 184 DISALLOW_COPY_AND_ASSIGN(GCIdleTimeHandler); |
181 }; | 185 }; |
182 | 186 |
183 } // namespace internal | 187 } // namespace internal |
184 } // namespace v8 | 188 } // namespace v8 |
185 | 189 |
186 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ | 190 #endif // V8_HEAP_GC_IDLE_TIME_HANDLER_H_ |
OLD | NEW |