| 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/heap/incremental-marking.h" | 7 #include "src/heap/incremental-marking.h" |
| 8 | 8 |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 // when we finish marking. | 575 // when we finish marking. |
| 576 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); | 576 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); |
| 577 } | 577 } |
| 578 | 578 |
| 579 // Mark strong roots grey. | 579 // Mark strong roots grey. |
| 580 IncrementalMarkingRootMarkingVisitor visitor(this); | 580 IncrementalMarkingRootMarkingVisitor visitor(this); |
| 581 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); | 581 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |
| 582 | 582 |
| 583 heap_->mark_compact_collector()->MarkWeakObjectToCodeTable(); | 583 heap_->mark_compact_collector()->MarkWeakObjectToCodeTable(); |
| 584 | 584 |
| 585 heap_->IterateEmbeddedMapCache(&visitor); |
| 586 |
| 585 // Ready to start incremental marking. | 587 // Ready to start incremental marking. |
| 586 if (FLAG_trace_incremental_marking) { | 588 if (FLAG_trace_incremental_marking) { |
| 587 PrintF("[IncrementalMarking] Running\n"); | 589 PrintF("[IncrementalMarking] Running\n"); |
| 588 } | 590 } |
| 589 } | 591 } |
| 590 | 592 |
| 591 | 593 |
| 592 void IncrementalMarking::PrepareForScavenge() { | 594 void IncrementalMarking::PrepareForScavenge() { |
| 593 if (!IsMarking()) return; | 595 if (!IsMarking()) return; |
| 594 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), | 596 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), |
| (...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 998 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1000 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 999 idle_marking_delay_counter_++; | 1001 idle_marking_delay_counter_++; |
| 1000 } | 1002 } |
| 1001 | 1003 |
| 1002 | 1004 |
| 1003 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1005 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1004 idle_marking_delay_counter_ = 0; | 1006 idle_marking_delay_counter_ = 0; |
| 1005 } | 1007 } |
| 1006 } | 1008 } |
| 1007 } // namespace v8::internal | 1009 } // namespace v8::internal |
| OLD | NEW |