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 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 if (FLAG_cleanup_code_caches_at_gc) { | 545 if (FLAG_cleanup_code_caches_at_gc) { |
546 // We will mark cache black with a separate pass | 546 // We will mark cache black with a separate pass |
547 // when we finish marking. | 547 // when we finish marking. |
548 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); | 548 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); |
549 } | 549 } |
550 | 550 |
551 // Mark strong roots grey. | 551 // Mark strong roots grey. |
552 IncrementalMarkingRootMarkingVisitor visitor(this); | 552 IncrementalMarkingRootMarkingVisitor visitor(this); |
553 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); | 553 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |
554 | 554 |
555 heap_->mark_compact_collector()->MarkWeakObjectToCodeTable(); | |
556 | |
557 // Ready to start incremental marking. | 555 // Ready to start incremental marking. |
558 if (FLAG_trace_incremental_marking) { | 556 if (FLAG_trace_incremental_marking) { |
559 PrintF("[IncrementalMarking] Running\n"); | 557 PrintF("[IncrementalMarking] Running\n"); |
560 } | 558 } |
561 } | 559 } |
562 | 560 |
563 | 561 |
564 void IncrementalMarking::PrepareForScavenge() { | 562 void IncrementalMarking::PrepareForScavenge() { |
565 if (!IsMarking()) return; | 563 if (!IsMarking()) return; |
566 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), | 564 NewSpacePageIterator it(heap_->new_space()->FromSpaceStart(), |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1005 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1003 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1006 idle_marking_delay_counter_++; | 1004 idle_marking_delay_counter_++; |
1007 } | 1005 } |
1008 | 1006 |
1009 | 1007 |
1010 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1008 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1011 idle_marking_delay_counter_ = 0; | 1009 idle_marking_delay_counter_ = 0; |
1012 } | 1010 } |
1013 } | 1011 } |
1014 } // namespace v8::internal | 1012 } // namespace v8::internal |
OLD | NEW |