| 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" |
| 11 #include "src/heap/gc-tracer.h" | 11 #include "src/heap/gc-tracer.h" |
| 12 #include "src/heap/mark-compact-inl.h" | 12 #include "src/heap/mark-compact-inl.h" |
| 13 #include "src/heap/object-groups-tracer.h" |
| 14 #include "src/heap/objects-visiting-inl.h" |
| 13 #include "src/heap/objects-visiting.h" | 15 #include "src/heap/objects-visiting.h" |
| 14 #include "src/heap/objects-visiting-inl.h" | |
| 15 #include "src/tracing/trace-event.h" | 16 #include "src/tracing/trace-event.h" |
| 16 #include "src/v8.h" | 17 #include "src/v8.h" |
| 17 | 18 |
| 18 namespace v8 { | 19 namespace v8 { |
| 19 namespace internal { | 20 namespace internal { |
| 20 | 21 |
| 21 IncrementalMarking::StepActions IncrementalMarking::IdleStepActions() { | 22 IncrementalMarking::StepActions IncrementalMarking::IdleStepActions() { |
| 22 return StepActions(IncrementalMarking::NO_GC_VIA_STACK_GUARD, | 23 return StepActions(IncrementalMarking::NO_GC_VIA_STACK_GUARD, |
| 23 IncrementalMarking::FORCE_MARKING, | 24 IncrementalMarking::FORCE_MARKING, |
| 24 IncrementalMarking::DO_NOT_FORCE_COMPLETION); | 25 IncrementalMarking::DO_NOT_FORCE_COMPLETION); |
| (...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 | 613 |
| 613 | 614 |
| 614 void IncrementalMarking::MarkObjectGroups() { | 615 void IncrementalMarking::MarkObjectGroups() { |
| 615 DCHECK(!finalize_marking_completed_); | 616 DCHECK(!finalize_marking_completed_); |
| 616 DCHECK(IsMarking()); | 617 DCHECK(IsMarking()); |
| 617 | 618 |
| 618 IncrementalMarkingRootMarkingVisitor visitor(this); | 619 IncrementalMarkingRootMarkingVisitor visitor(this); |
| 619 heap_->mark_compact_collector()->MarkImplicitRefGroups(&MarkObject); | 620 heap_->mark_compact_collector()->MarkImplicitRefGroups(&MarkObject); |
| 620 heap_->isolate()->global_handles()->IterateObjectGroups( | 621 heap_->isolate()->global_handles()->IterateObjectGroups( |
| 621 &visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap); | 622 &visitor, &MarkCompactCollector::IsUnmarkedHeapObjectWithHeap); |
| 623 |
| 622 heap_->isolate()->global_handles()->RemoveImplicitRefGroups(); | 624 heap_->isolate()->global_handles()->RemoveImplicitRefGroups(); |
| 623 heap_->isolate()->global_handles()->RemoveObjectGroups(); | 625 heap_->isolate()->global_handles()->RemoveObjectGroups(); |
| 624 } | 626 } |
| 625 | 627 |
| 626 | 628 |
| 627 void IncrementalMarking::ProcessWeakCells() { | 629 void IncrementalMarking::ProcessWeakCells() { |
| 628 DCHECK(!finalize_marking_completed_); | 630 DCHECK(!finalize_marking_completed_); |
| 629 DCHECK(IsMarking()); | 631 DCHECK(IsMarking()); |
| 630 | 632 |
| 631 Object* the_hole_value = heap()->the_hole_value(); | 633 Object* the_hole_value = heap()->the_hole_value(); |
| (...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1244 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1246 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1245 idle_marking_delay_counter_++; | 1247 idle_marking_delay_counter_++; |
| 1246 } | 1248 } |
| 1247 | 1249 |
| 1248 | 1250 |
| 1249 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1251 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1250 idle_marking_delay_counter_ = 0; | 1252 idle_marking_delay_counter_ = 0; |
| 1251 } | 1253 } |
| 1252 } // namespace internal | 1254 } // namespace internal |
| 1253 } // namespace v8 | 1255 } // namespace v8 |
| OLD | NEW |