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 1035 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1046 } while (remaining_time_in_ms >= kStepSizeInMs && !IsComplete() && | 1046 } while (remaining_time_in_ms >= kStepSizeInMs && !IsComplete() && |
1047 !heap()->mark_compact_collector()->marking_deque()->IsEmpty()); | 1047 !heap()->mark_compact_collector()->marking_deque()->IsEmpty()); |
1048 return remaining_time_in_ms; | 1048 return remaining_time_in_ms; |
1049 } | 1049 } |
1050 | 1050 |
1051 | 1051 |
1052 void IncrementalMarking::FinalizeSweeping() { | 1052 void IncrementalMarking::FinalizeSweeping() { |
1053 DCHECK(state_ == SWEEPING); | 1053 DCHECK(state_ == SWEEPING); |
1054 if (heap_->mark_compact_collector()->sweeping_in_progress() && | 1054 if (heap_->mark_compact_collector()->sweeping_in_progress() && |
1055 (!FLAG_concurrent_sweeping || | 1055 (!FLAG_concurrent_sweeping || |
1056 heap_->mark_compact_collector()->sweeper().IsSweepingCompleted())) { | 1056 !heap_->mark_compact_collector()->sweeper().AreSweeperTasksRunning())) { |
1057 heap_->mark_compact_collector()->EnsureSweepingCompleted(); | 1057 heap_->mark_compact_collector()->EnsureSweepingCompleted(); |
1058 } | 1058 } |
1059 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { | 1059 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { |
1060 StartMarking(); | 1060 StartMarking(); |
1061 } | 1061 } |
1062 } | 1062 } |
1063 | 1063 |
1064 size_t IncrementalMarking::StepSizeToKeepUpWithAllocations() { | 1064 size_t IncrementalMarking::StepSizeToKeepUpWithAllocations() { |
1065 // Update bytes_allocated_ based on the allocation counter. | 1065 // Update bytes_allocated_ based on the allocation counter. |
1066 size_t current_counter = heap_->OldGenerationAllocationCounter(); | 1066 size_t current_counter = heap_->OldGenerationAllocationCounter(); |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1196 idle_marking_delay_counter_++; | 1196 idle_marking_delay_counter_++; |
1197 } | 1197 } |
1198 | 1198 |
1199 | 1199 |
1200 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1200 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1201 idle_marking_delay_counter_ = 0; | 1201 idle_marking_delay_counter_ = 0; |
1202 } | 1202 } |
1203 | 1203 |
1204 } // namespace internal | 1204 } // namespace internal |
1205 } // namespace v8 | 1205 } // namespace v8 |
OLD | NEW |