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 718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
729 heap_->mark_compact_collector()->marking_deque()->top(); | 729 heap_->mark_compact_collector()->marking_deque()->top(); |
730 | 730 |
731 // After finishing incremental marking, we try to discover all unmarked | 731 // After finishing incremental marking, we try to discover all unmarked |
732 // objects to reduce the marking load in the final pause. | 732 // objects to reduce the marking load in the final pause. |
733 // 1) We scan and mark the roots again to find all changes to the root set. | 733 // 1) We scan and mark the roots again to find all changes to the root set. |
734 // 2) We mark the object groups. | 734 // 2) We mark the object groups. |
735 // 3) Age and retain maps embedded in optimized code. | 735 // 3) Age and retain maps embedded in optimized code. |
736 // 4) Remove weak cell with live values from the list of weak cells, they | 736 // 4) Remove weak cell with live values from the list of weak cells, they |
737 // do not need processing during GC. | 737 // do not need processing during GC. |
738 MarkRoots(); | 738 MarkRoots(); |
739 if (!heap_->local_embedder_heap_tracer()->InUse()) { | 739 if (!heap_->local_embedder_heap_tracer()->InUse() && |
740 FLAG_object_grouping_in_incremental_finalization) { | |
740 MarkObjectGroups(); | 741 MarkObjectGroups(); |
741 } | 742 } |
742 if (incremental_marking_finalization_rounds_ == 0) { | |
ulan
2017/03/30 16:24:30
This changes reduce noise in incremental finalizat
| |
743 // Map retaining is needed for perfromance, not correctness, | |
744 // so we can do it only once at the beginning of the finalization. | |
745 RetainMaps(); | |
746 } | |
747 ProcessWeakCells(); | |
748 | 743 |
749 int marking_progress = | 744 int marking_progress = |
750 abs(old_marking_deque_top - | 745 abs(old_marking_deque_top - |
751 heap_->mark_compact_collector()->marking_deque()->top()); | 746 heap_->mark_compact_collector()->marking_deque()->top()); |
752 | 747 |
753 marking_progress += static_cast<int>( | 748 marking_progress += static_cast<int>( |
754 heap_->local_embedder_heap_tracer()->NumberOfCachedWrappersToTrace()); | 749 heap_->local_embedder_heap_tracer()->NumberOfCachedWrappersToTrace()); |
755 | 750 |
756 double end = heap_->MonotonicallyIncreasingTimeInMs(); | 751 double end = heap_->MonotonicallyIncreasingTimeInMs(); |
757 double delta = end - start; | 752 double delta = end - start; |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1212 idle_marking_delay_counter_++; | 1207 idle_marking_delay_counter_++; |
1213 } | 1208 } |
1214 | 1209 |
1215 | 1210 |
1216 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1211 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1217 idle_marking_delay_counter_ = 0; | 1212 idle_marking_delay_counter_ = 0; |
1218 } | 1213 } |
1219 | 1214 |
1220 } // namespace internal | 1215 } // namespace internal |
1221 } // namespace v8 | 1216 } // namespace v8 |
OLD | NEW |