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-tracer.h" | 10 #include "src/heap/gc-tracer.h" |
(...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
534 // Ready to start incremental marking. | 534 // Ready to start incremental marking. |
535 if (FLAG_trace_incremental_marking) { | 535 if (FLAG_trace_incremental_marking) { |
536 PrintF("[IncrementalMarking] Running\n"); | 536 PrintF("[IncrementalMarking] Running\n"); |
537 } | 537 } |
538 } | 538 } |
539 | 539 |
540 | 540 |
541 void IncrementalMarking::MarkObjectGroups() { | 541 void IncrementalMarking::MarkObjectGroups() { |
542 DCHECK(FLAG_overapproximate_weak_closure); | 542 DCHECK(FLAG_overapproximate_weak_closure); |
543 DCHECK(!weak_closure_was_overapproximated_); | 543 DCHECK(!weak_closure_was_overapproximated_); |
| 544 DCHECK(IsMarking()); |
544 | 545 |
545 int old_marking_deque_top = | 546 int old_marking_deque_top = |
546 heap_->mark_compact_collector()->marking_deque()->top(); | 547 heap_->mark_compact_collector()->marking_deque()->top(); |
547 | 548 |
548 heap_->mark_compact_collector()->MarkImplicitRefGroups(&MarkObject); | 549 heap_->mark_compact_collector()->MarkImplicitRefGroups(&MarkObject); |
549 | 550 |
550 IncrementalMarkingRootMarkingVisitor visitor(this); | 551 IncrementalMarkingRootMarkingVisitor visitor(this); |
551 heap_->isolate()->global_handles()->IterateObjectGroups( | 552 heap_->isolate()->global_handles()->IterateObjectGroups( |
552 &visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap); | 553 &visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap); |
553 | 554 |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1012 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1012 idle_marking_delay_counter_++; | 1013 idle_marking_delay_counter_++; |
1013 } | 1014 } |
1014 | 1015 |
1015 | 1016 |
1016 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1017 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1017 idle_marking_delay_counter_ = 0; | 1018 idle_marking_delay_counter_ = 0; |
1018 } | 1019 } |
1019 } // namespace internal | 1020 } // namespace internal |
1020 } // namespace v8 | 1021 } // namespace v8 |
OLD | NEW |