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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
619 void IncrementalMarking::FinishBlackAllocation() { | 619 void IncrementalMarking::FinishBlackAllocation() { |
620 if (black_allocation_) { | 620 if (black_allocation_) { |
621 black_allocation_ = false; | 621 black_allocation_ = false; |
622 if (FLAG_trace_incremental_marking) { | 622 if (FLAG_trace_incremental_marking) { |
623 heap()->isolate()->PrintWithTimestamp( | 623 heap()->isolate()->PrintWithTimestamp( |
624 "[IncrementalMarking] Black allocation finished\n"); | 624 "[IncrementalMarking] Black allocation finished\n"); |
625 } | 625 } |
626 } | 626 } |
627 } | 627 } |
628 | 628 |
| 629 void IncrementalMarking::AbortBlackAllocation() { |
| 630 for (Page* page : *heap()->old_space()) { |
| 631 page->ReleaseBlackAreaEndMarkerMap(); |
| 632 } |
| 633 if (FLAG_trace_incremental_marking) { |
| 634 heap()->isolate()->PrintWithTimestamp( |
| 635 "[IncrementalMarking] Black allocation aborted\n"); |
| 636 } |
| 637 } |
| 638 |
629 void IncrementalMarking::MarkRoots() { | 639 void IncrementalMarking::MarkRoots() { |
630 DCHECK(!finalize_marking_completed_); | 640 DCHECK(!finalize_marking_completed_); |
631 DCHECK(IsMarking()); | 641 DCHECK(IsMarking()); |
632 | 642 |
633 IncrementalMarkingRootMarkingVisitor visitor(this); | 643 IncrementalMarkingRootMarkingVisitor visitor(this); |
634 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); | 644 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |
635 } | 645 } |
636 | 646 |
637 | 647 |
638 void IncrementalMarking::MarkObjectGroups() { | 648 void IncrementalMarking::MarkObjectGroups() { |
(...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1313 idle_marking_delay_counter_++; | 1323 idle_marking_delay_counter_++; |
1314 } | 1324 } |
1315 | 1325 |
1316 | 1326 |
1317 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1327 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1318 idle_marking_delay_counter_ = 0; | 1328 idle_marking_delay_counter_ = 0; |
1319 } | 1329 } |
1320 | 1330 |
1321 } // namespace internal | 1331 } // namespace internal |
1322 } // namespace v8 | 1332 } // namespace v8 |
OLD | NEW |