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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 "[IncrementalMarking] Marking speed increased to %d\n", | 1156 "[IncrementalMarking] Marking speed increased to %d\n", |
1157 marking_speed_); | 1157 marking_speed_); |
1158 } | 1158 } |
1159 } | 1159 } |
1160 } | 1160 } |
1161 } | 1161 } |
1162 | 1162 |
1163 void IncrementalMarking::FinalizeSweeping() { | 1163 void IncrementalMarking::FinalizeSweeping() { |
1164 DCHECK(state_ == SWEEPING); | 1164 DCHECK(state_ == SWEEPING); |
1165 if (heap_->mark_compact_collector()->sweeping_in_progress() && | 1165 if (heap_->mark_compact_collector()->sweeping_in_progress() && |
1166 (heap_->mark_compact_collector()->sweeper().IsSweepingCompleted() || | 1166 (!FLAG_concurrent_sweeping || |
1167 !FLAG_concurrent_sweeping)) { | 1167 heap_->mark_compact_collector()->sweeper().IsSweepingCompleted())) { |
1168 heap_->mark_compact_collector()->EnsureSweepingCompleted(); | 1168 heap_->mark_compact_collector()->EnsureSweepingCompleted(); |
1169 } | 1169 } |
1170 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { | 1170 if (!heap_->mark_compact_collector()->sweeping_in_progress()) { |
1171 bytes_scanned_ = 0; | 1171 bytes_scanned_ = 0; |
1172 StartMarking(); | 1172 StartMarking(); |
1173 } | 1173 } |
1174 } | 1174 } |
1175 | 1175 |
1176 void IncrementalMarking::NotifyAllocatedBytes(intptr_t allocated_bytes) { | 1176 void IncrementalMarking::NotifyAllocatedBytes(intptr_t allocated_bytes) { |
1177 if (heap_->gc_state() != Heap::NOT_IN_GC || !FLAG_incremental_marking || | 1177 if (heap_->gc_state() != Heap::NOT_IN_GC || !FLAG_incremental_marking || |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1323 idle_marking_delay_counter_++; | 1323 idle_marking_delay_counter_++; |
1324 } | 1324 } |
1325 | 1325 |
1326 | 1326 |
1327 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1327 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1328 idle_marking_delay_counter_ = 0; | 1328 idle_marking_delay_counter_ = 0; |
1329 } | 1329 } |
1330 | 1330 |
1331 } // namespace internal | 1331 } // namespace internal |
1332 } // namespace v8 | 1332 } // namespace v8 |
OLD | NEW |