| 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 heap_->mark_compact_collector()->marking_deque()->top(); | 728 heap_->mark_compact_collector()->marking_deque()->top(); |
| 729 | 729 |
| 730 // After finishing incremental marking, we try to discover all unmarked | 730 // After finishing incremental marking, we try to discover all unmarked |
| 731 // objects to reduce the marking load in the final pause. | 731 // objects to reduce the marking load in the final pause. |
| 732 // 1) We scan and mark the roots again to find all changes to the root set. | 732 // 1) We scan and mark the roots again to find all changes to the root set. |
| 733 // 2) We mark the object groups. | 733 // 2) We mark the object groups. |
| 734 // 3) Age and retain maps embedded in optimized code. | 734 // 3) Age and retain maps embedded in optimized code. |
| 735 // 4) Remove weak cell with live values from the list of weak cells, they | 735 // 4) Remove weak cell with live values from the list of weak cells, they |
| 736 // do not need processing during GC. | 736 // do not need processing during GC. |
| 737 MarkRoots(); | 737 MarkRoots(); |
| 738 MarkObjectGroups(); | 738 if (!heap_->mark_compact_collector()->UsingEmbedderHeapTracer()) { |
| 739 MarkObjectGroups(); |
| 740 } |
| 739 if (incremental_marking_finalization_rounds_ == 0) { | 741 if (incremental_marking_finalization_rounds_ == 0) { |
| 740 // Map retaining is needed for perfromance, not correctness, | 742 // Map retaining is needed for perfromance, not correctness, |
| 741 // so we can do it only once at the beginning of the finalization. | 743 // so we can do it only once at the beginning of the finalization. |
| 742 RetainMaps(); | 744 RetainMaps(); |
| 743 } | 745 } |
| 744 ProcessWeakCells(); | 746 ProcessWeakCells(); |
| 745 | 747 |
| 746 int marking_progress = | 748 int marking_progress = |
| 747 abs(old_marking_deque_top - | 749 abs(old_marking_deque_top - |
| 748 heap_->mark_compact_collector()->marking_deque()->top()); | 750 heap_->mark_compact_collector()->marking_deque()->top()); |
| (...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1242 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1244 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1243 idle_marking_delay_counter_++; | 1245 idle_marking_delay_counter_++; |
| 1244 } | 1246 } |
| 1245 | 1247 |
| 1246 | 1248 |
| 1247 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1249 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1248 idle_marking_delay_counter_ = 0; | 1250 idle_marking_delay_counter_ = 0; |
| 1249 } | 1251 } |
| 1250 } // namespace internal | 1252 } // namespace internal |
| 1251 } // namespace v8 | 1253 } // namespace v8 |
| OLD | NEW |