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 646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
657 | 657 |
658 // After finishing incremental marking, we try to discover all unmarked | 658 // After finishing incremental marking, we try to discover all unmarked |
659 // objects to reduce the marking load in the final pause. | 659 // objects to reduce the marking load in the final pause. |
660 // 1) We scan and mark the roots again to find all changes to the root set. | 660 // 1) We scan and mark the roots again to find all changes to the root set. |
661 // 2) We mark the object groups. | 661 // 2) We mark the object groups. |
662 MarkRoots(); | 662 MarkRoots(); |
663 MarkObjectGroups(); | 663 MarkObjectGroups(); |
664 | 664 |
665 int marking_progress = | 665 int marking_progress = |
666 abs(old_marking_deque_top - | 666 abs(old_marking_deque_top - |
667 heap_->mark_compact_collector()->marking_deque()->top()) / | 667 heap_->mark_compact_collector()->marking_deque()->top()); |
668 kPointerSize; | |
669 | 668 |
670 ++incremental_marking_finalization_rounds_; | 669 ++incremental_marking_finalization_rounds_; |
671 if ((incremental_marking_finalization_rounds_ >= | 670 if ((incremental_marking_finalization_rounds_ >= |
672 FLAG_max_incremental_marking_finalization_rounds) || | 671 FLAG_max_incremental_marking_finalization_rounds) || |
673 (marking_progress < | 672 (marking_progress < |
674 FLAG_min_progress_during_incremental_marking_finalization)) { | 673 FLAG_min_progress_during_incremental_marking_finalization)) { |
675 finalize_marking_completed_ = true; | 674 finalize_marking_completed_ = true; |
676 } | 675 } |
677 } | 676 } |
678 | 677 |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1153 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1152 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1154 idle_marking_delay_counter_++; | 1153 idle_marking_delay_counter_++; |
1155 } | 1154 } |
1156 | 1155 |
1157 | 1156 |
1158 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1157 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1159 idle_marking_delay_counter_ = 0; | 1158 idle_marking_delay_counter_ = 0; |
1160 } | 1159 } |
1161 } // namespace internal | 1160 } // namespace internal |
1162 } // namespace v8 | 1161 } // namespace v8 |
OLD | NEW |