| 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 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 722 heap_->mark_compact_collector()->marking_deque()->top(); | 722 heap_->mark_compact_collector()->marking_deque()->top(); |
| 723 | 723 |
| 724 // After finishing incremental marking, we try to discover all unmarked | 724 // After finishing incremental marking, we try to discover all unmarked |
| 725 // objects to reduce the marking load in the final pause. | 725 // objects to reduce the marking load in the final pause. |
| 726 // 1) We scan and mark the roots again to find all changes to the root set. | 726 // 1) We scan and mark the roots again to find all changes to the root set. |
| 727 // 2) We mark the object groups. | 727 // 2) We mark the object groups. |
| 728 // 3) Age and retain maps embedded in optimized code. | 728 // 3) Age and retain maps embedded in optimized code. |
| 729 // 4) Remove weak cell with live values from the list of weak cells, they | 729 // 4) Remove weak cell with live values from the list of weak cells, they |
| 730 // do not need processing during GC. | 730 // do not need processing during GC. |
| 731 MarkRoots(); | 731 MarkRoots(); |
| 732 MarkObjectGroups(); | 732 if (!heap_->UsingEmbedderHeapTracer()) { |
| 733 MarkObjectGroups(); |
| 734 } |
| 733 if (incremental_marking_finalization_rounds_ == 0) { | 735 if (incremental_marking_finalization_rounds_ == 0) { |
| 734 // Map retaining is needed for perfromance, not correctness, | 736 // Map retaining is needed for perfromance, not correctness, |
| 735 // so we can do it only once at the beginning of the finalization. | 737 // so we can do it only once at the beginning of the finalization. |
| 736 RetainMaps(); | 738 RetainMaps(); |
| 737 } | 739 } |
| 738 ProcessWeakCells(); | 740 ProcessWeakCells(); |
| 739 | 741 |
| 740 int marking_progress = | 742 int marking_progress = |
| 741 abs(old_marking_deque_top - | 743 abs(old_marking_deque_top - |
| 742 heap_->mark_compact_collector()->marking_deque()->top()); | 744 heap_->mark_compact_collector()->marking_deque()->top()); |
| (...skipping 483 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1226 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1228 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1227 idle_marking_delay_counter_++; | 1229 idle_marking_delay_counter_++; |
| 1228 } | 1230 } |
| 1229 | 1231 |
| 1230 | 1232 |
| 1231 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1233 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1232 idle_marking_delay_counter_ = 0; | 1234 idle_marking_delay_counter_ = 0; |
| 1233 } | 1235 } |
| 1234 } // namespace internal | 1236 } // namespace internal |
| 1235 } // namespace v8 | 1237 } // namespace v8 |
| OLD | NEW |