| 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 543 if (FLAG_cleanup_code_caches_at_gc) { | 543 if (FLAG_cleanup_code_caches_at_gc) { |
| 544 // We will mark cache black with a separate pass | 544 // We will mark cache black with a separate pass |
| 545 // when we finish marking. | 545 // when we finish marking. |
| 546 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); | 546 MarkObjectGreyDoNotEnqueue(heap_->polymorphic_code_cache()); |
| 547 } | 547 } |
| 548 | 548 |
| 549 // Mark strong roots grey. | 549 // Mark strong roots grey. |
| 550 IncrementalMarkingRootMarkingVisitor visitor(this); | 550 IncrementalMarkingRootMarkingVisitor visitor(this); |
| 551 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); | 551 heap_->IterateStrongRoots(&visitor, VISIT_ONLY_STRONG); |
| 552 | 552 |
| 553 heap_->mark_compact_collector()->MarkWeakObjectToCodeTable(); | 553 heap_->mark_compact_collector()->MarkWeakObjectToCodeTable(&visitor); |
| 554 | 554 |
| 555 // Ready to start incremental marking. | 555 // Ready to start incremental marking. |
| 556 if (FLAG_trace_incremental_marking) { | 556 if (FLAG_trace_incremental_marking) { |
| 557 PrintF("[IncrementalMarking] Running\n"); | 557 PrintF("[IncrementalMarking] Running\n"); |
| 558 } | 558 } |
| 559 } | 559 } |
| 560 | 560 |
| 561 | 561 |
| 562 void IncrementalMarking::PrepareForScavenge() { | 562 void IncrementalMarking::PrepareForScavenge() { |
| 563 if (!IsMarking()) return; | 563 if (!IsMarking()) return; |
| (...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 981 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 982 idle_marking_delay_counter_++; | 982 idle_marking_delay_counter_++; |
| 983 } | 983 } |
| 984 | 984 |
| 985 | 985 |
| 986 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 986 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 987 idle_marking_delay_counter_ = 0; | 987 idle_marking_delay_counter_ = 0; |
| 988 } | 988 } |
| 989 } | 989 } |
| 990 } // namespace v8::internal | 990 } // namespace v8::internal |
| OLD | NEW |