OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
(...skipping 1031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 } while (remaining_time_in_ms >= kStepSizeInMs && !IsComplete() && | 1042 } while (remaining_time_in_ms >= kStepSizeInMs && !IsComplete() && |
1043 !heap()->mark_compact_collector()->marking_deque()->IsEmpty()); | 1043 !heap()->mark_compact_collector()->marking_deque()->IsEmpty()); |
1044 return remaining_time_in_ms; | 1044 return remaining_time_in_ms; |
1045 } | 1045 } |
1046 | 1046 |
1047 | 1047 |
1048 void IncrementalMarking::FinalizeSweeping() { | 1048 void IncrementalMarking::FinalizeSweeping() { |
1049 DCHECK(state_ == SWEEPING); | 1049 DCHECK(state_ == SWEEPING); |
1050 if (heap_->mark_compact_collector()->sweeping_in_progress() && | 1050 if (heap_->mark_compact_collector()->sweeping_in_progress() && |
1051 (!FLAG_concurrent_sweeping || | 1051 (!FLAG_concurrent_sweeping || |
1052 heap_->mark_compact_collector()->sweeper().IsSweepingCompleted())) { | 1052 !heap_->mark_compact_collector()->sweeper().AreSweeperTasksRunning())) { |
1053 heap_->mark_compact_collector()->EnsureSweepingCompleted(); | 1053 heap_->mark_compact_collector()->EnsureSweepingCompleted(); |
1054 } | 1054 } |
1055 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { | 1055 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { |
1056 StartMarking(); | 1056 StartMarking(); |
1057 } | 1057 } |
1058 } | 1058 } |
1059 | 1059 |
1060 size_t IncrementalMarking::StepSizeToKeepUpWithAllocations() { | 1060 size_t IncrementalMarking::StepSizeToKeepUpWithAllocations() { |
1061 // Update bytes_allocated_ based on the allocation counter. | 1061 // Update bytes_allocated_ based on the allocation counter. |
1062 size_t current_counter = heap_->OldGenerationAllocationCounter(); | 1062 size_t current_counter = heap_->OldGenerationAllocationCounter(); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 idle_marking_delay_counter_++; | 1192 idle_marking_delay_counter_++; |
1193 } | 1193 } |
1194 | 1194 |
1195 | 1195 |
1196 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1196 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1197 idle_marking_delay_counter_ = 0; | 1197 idle_marking_delay_counter_ = 0; |
1198 } | 1198 } |
1199 | 1199 |
1200 } // namespace internal | 1200 } // namespace internal |
1201 } // namespace v8 | 1201 } // namespace v8 |
OLD | NEW |