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 #include "src/heap/gc-idle-time-handler.h" | 5 #include "src/heap/gc-idle-time-handler.h" |
6 | 6 |
7 #include "src/flags.h" | 7 #include "src/flags.h" |
8 #include "src/heap/gc-tracer.h" | 8 #include "src/heap/gc-tracer.h" |
9 #include "src/utils.h" | 9 #include "src/utils.h" |
10 | 10 |
(...skipping 26 matching lines...) Expand all Loading... |
37 break; | 37 break; |
38 } | 38 } |
39 } | 39 } |
40 | 40 |
41 | 41 |
42 void GCIdleTimeHeapState::Print() { | 42 void GCIdleTimeHeapState::Print() { |
43 PrintF("contexts_disposed=%d ", contexts_disposed); | 43 PrintF("contexts_disposed=%d ", contexts_disposed); |
44 PrintF("contexts_disposal_rate=%f ", contexts_disposal_rate); | 44 PrintF("contexts_disposal_rate=%f ", contexts_disposal_rate); |
45 PrintF("size_of_objects=%" V8_PTR_PREFIX "d ", size_of_objects); | 45 PrintF("size_of_objects=%" V8_PTR_PREFIX "d ", size_of_objects); |
46 PrintF("incremental_marking_stopped=%d ", incremental_marking_stopped); | 46 PrintF("incremental_marking_stopped=%d ", incremental_marking_stopped); |
47 PrintF("sweeping_in_progress=%d ", sweeping_in_progress); | |
48 PrintF("has_low_allocation_rate=%d", has_low_allocation_rate); | |
49 PrintF("mark_compact_speed=%" V8_PTR_PREFIX "d ", | |
50 mark_compact_speed_in_bytes_per_ms); | |
51 PrintF("incremental_marking_speed=%" V8_PTR_PREFIX "d ", | |
52 incremental_marking_speed_in_bytes_per_ms); | |
53 } | 47 } |
54 | 48 |
55 | 49 |
56 size_t GCIdleTimeHandler::EstimateMarkingStepSize( | 50 size_t GCIdleTimeHandler::EstimateMarkingStepSize( |
57 size_t idle_time_in_ms, size_t marking_speed_in_bytes_per_ms) { | 51 size_t idle_time_in_ms, size_t marking_speed_in_bytes_per_ms) { |
58 DCHECK(idle_time_in_ms > 0); | 52 DCHECK(idle_time_in_ms > 0); |
59 | 53 |
60 if (marking_speed_in_bytes_per_ms == 0) { | 54 if (marking_speed_in_bytes_per_ms == 0) { |
61 marking_speed_in_bytes_per_ms = kInitialConservativeMarkingSpeed; | 55 marking_speed_in_bytes_per_ms = kInitialConservativeMarkingSpeed; |
62 } | 56 } |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 if (!FLAG_incremental_marking || heap_state.incremental_marking_stopped) { | 175 if (!FLAG_incremental_marking || heap_state.incremental_marking_stopped) { |
182 return GCIdleTimeAction::Done(); | 176 return GCIdleTimeAction::Done(); |
183 } | 177 } |
184 | 178 |
185 return GCIdleTimeAction::IncrementalStep(); | 179 return GCIdleTimeAction::IncrementalStep(); |
186 } | 180 } |
187 | 181 |
188 | 182 |
189 } // namespace internal | 183 } // namespace internal |
190 } // namespace v8 | 184 } // namespace v8 |
OLD | NEW |