| 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/objects-visiting.h" | 13 #include "src/heap/objects-visiting.h" |
| 14 #include "src/heap/objects-visiting-inl.h" | 14 #include "src/heap/objects-visiting-inl.h" |
| 15 #include "src/v8.h" | 15 #include "src/v8.h" |
| 16 | 16 |
| 17 namespace v8 { | 17 namespace v8 { |
| 18 namespace internal { | 18 namespace internal { |
| 19 | 19 |
| 20 IncrementalMarking::StepActions IncrementalMarking::IdleStepActions() { | 20 IncrementalMarking::StepActions IncrementalMarking::IdleStepActions() { |
| 21 return StepActions(IncrementalMarking::NO_GC_VIA_STACK_GUARD, | 21 return StepActions(IncrementalMarking::NO_GC_VIA_STACK_GUARD, |
| 22 IncrementalMarking::FORCE_MARKING, | 22 IncrementalMarking::FORCE_MARKING, |
| 23 IncrementalMarking::DO_NOT_FORCE_COMPLETION); | 23 IncrementalMarking::DO_NOT_FORCE_COMPLETION); |
| 24 } | 24 } |
| 25 | 25 |
| 26 | 26 |
| 27 IncrementalMarking::IncrementalMarking(Heap* heap) | 27 IncrementalMarking::IncrementalMarking(Heap* heap) |
| 28 : heap_(heap), | 28 : heap_(heap), |
| 29 observer_(*this, kAllocatedThreshold), | 29 observer_(*this, heap, kAllocatedThreshold), |
| 30 state_(STOPPED), | 30 state_(STOPPED), |
| 31 is_compacting_(false), | 31 is_compacting_(false), |
| 32 steps_count_(0), | 32 steps_count_(0), |
| 33 old_generation_space_available_at_start_of_incremental_(0), | 33 old_generation_space_available_at_start_of_incremental_(0), |
| 34 old_generation_space_used_at_start_of_incremental_(0), | 34 old_generation_space_used_at_start_of_incremental_(0), |
| 35 bytes_rescanned_(0), | 35 bytes_rescanned_(0), |
| 36 should_hurry_(false), | 36 should_hurry_(false), |
| 37 marking_speed_(0), | 37 marking_speed_(0), |
| 38 bytes_scanned_(0), | 38 bytes_scanned_(0), |
| 39 allocated_(0), | 39 allocated_(0), |
| (...skipping 1206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1246 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1246 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
| 1247 idle_marking_delay_counter_++; | 1247 idle_marking_delay_counter_++; |
| 1248 } | 1248 } |
| 1249 | 1249 |
| 1250 | 1250 |
| 1251 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1251 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
| 1252 idle_marking_delay_counter_ = 0; | 1252 idle_marking_delay_counter_ = 0; |
| 1253 } | 1253 } |
| 1254 } // namespace internal | 1254 } // namespace internal |
| 1255 } // namespace v8 | 1255 } // namespace v8 |
| OLD | NEW |