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 23 matching lines...) Expand all Loading... |
34 case DO_FULL_GC: | 34 case DO_FULL_GC: |
35 PrintF("full GC"); | 35 PrintF("full GC"); |
36 break; | 36 break; |
37 } | 37 } |
38 } | 38 } |
39 | 39 |
40 | 40 |
41 void GCIdleTimeHeapState::Print() { | 41 void GCIdleTimeHeapState::Print() { |
42 PrintF("contexts_disposed=%d ", contexts_disposed); | 42 PrintF("contexts_disposed=%d ", contexts_disposed); |
43 PrintF("contexts_disposal_rate=%f ", contexts_disposal_rate); | 43 PrintF("contexts_disposal_rate=%f ", contexts_disposal_rate); |
44 PrintF("size_of_objects=%" PRIuS " ", size_of_objects); | 44 PrintF("size_of_objects=%" V8_SIZET_PREFIX V8_PTR_PREFIX "d ", |
| 45 size_of_objects); |
45 PrintF("incremental_marking_stopped=%d ", incremental_marking_stopped); | 46 PrintF("incremental_marking_stopped=%d ", incremental_marking_stopped); |
46 } | 47 } |
47 | 48 |
48 size_t GCIdleTimeHandler::EstimateMarkingStepSize( | 49 size_t GCIdleTimeHandler::EstimateMarkingStepSize( |
49 double idle_time_in_ms, double marking_speed_in_bytes_per_ms) { | 50 double idle_time_in_ms, double marking_speed_in_bytes_per_ms) { |
50 DCHECK(idle_time_in_ms > 0); | 51 DCHECK(idle_time_in_ms > 0); |
51 | 52 |
52 if (marking_speed_in_bytes_per_ms == 0) { | 53 if (marking_speed_in_bytes_per_ms == 0) { |
53 marking_speed_in_bytes_per_ms = kInitialConservativeMarkingSpeed; | 54 marking_speed_in_bytes_per_ms = kInitialConservativeMarkingSpeed; |
54 } | 55 } |
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 if (!FLAG_incremental_marking || heap_state.incremental_marking_stopped) { | 143 if (!FLAG_incremental_marking || heap_state.incremental_marking_stopped) { |
143 return GCIdleTimeAction::Done(); | 144 return GCIdleTimeAction::Done(); |
144 } | 145 } |
145 | 146 |
146 return GCIdleTimeAction::IncrementalStep(); | 147 return GCIdleTimeAction::IncrementalStep(); |
147 } | 148 } |
148 | 149 |
149 | 150 |
150 } // namespace internal | 151 } // namespace internal |
151 } // namespace v8 | 152 } // namespace v8 |
OLD | NEW |