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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
615 void IncrementalMarking::MarkRoots() { | 615 void IncrementalMarking::MarkRoots() { |
616 DCHECK(!finalize_marking_completed_); | 616 DCHECK(!finalize_marking_completed_); |
617 DCHECK(IsMarking()); | 617 DCHECK(IsMarking()); |
618 | 618 |
619 IncrementalMarkingRootMarkingVisitor visitor(this); | 619 IncrementalMarkingRootMarkingVisitor visitor(this); |
620 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); | 620 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |
621 } | 621 } |
622 | 622 |
623 | 623 |
624 void IncrementalMarking::MarkObjectGroups() { | 624 void IncrementalMarking::MarkObjectGroups() { |
| 625 TRACE_GC(heap_->tracer(), |
| 626 GCTracer::Scope::MC_INCREMENTAL_FINALIZE_OBJECT_GROUPING); |
| 627 |
625 DCHECK(!heap_->UsingEmbedderHeapTracer()); | 628 DCHECK(!heap_->UsingEmbedderHeapTracer()); |
626 DCHECK(!finalize_marking_completed_); | 629 DCHECK(!finalize_marking_completed_); |
627 DCHECK(IsMarking()); | 630 DCHECK(IsMarking()); |
628 | 631 |
629 IncrementalMarkingRootMarkingVisitor visitor(this); | 632 IncrementalMarkingRootMarkingVisitor visitor(this); |
630 heap_->mark_compact_collector()->MarkImplicitRefGroups(&MarkGrey); | 633 heap_->mark_compact_collector()->MarkImplicitRefGroups(&MarkGrey); |
631 heap_->isolate()->global_handles()->IterateObjectGroups( | 634 heap_->isolate()->global_handles()->IterateObjectGroups( |
632 &visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap); | 635 &visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap); |
633 heap_->isolate()->global_handles()->RemoveImplicitRefGroups(); | 636 heap_->isolate()->global_handles()->RemoveImplicitRefGroups(); |
634 heap_->isolate()->global_handles()->RemoveObjectGroups(); | 637 heap_->isolate()->global_handles()->RemoveObjectGroups(); |
(...skipping 636 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1271 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1274 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1272 idle_marking_delay_counter_++; | 1275 idle_marking_delay_counter_++; |
1273 } | 1276 } |
1274 | 1277 |
1275 | 1278 |
1276 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1279 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1277 idle_marking_delay_counter_ = 0; | 1280 idle_marking_delay_counter_ = 0; |
1278 } | 1281 } |
1279 } // namespace internal | 1282 } // namespace internal |
1280 } // namespace v8 | 1283 } // namespace v8 |
OLD | NEW |