| 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 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ | 5 #ifndef V8_HEAP_INCREMENTAL_MARKING_H_ |
| 6 #define V8_HEAP_INCREMENTAL_MARKING_H_ | 6 #define V8_HEAP_INCREMENTAL_MARKING_H_ |
| 7 | 7 |
| 8 #include "src/cancelable-task.h" |
| 8 #include "src/execution.h" | 9 #include "src/execution.h" |
| 10 #include "src/heap/incremental-marking-job.h" |
| 9 #include "src/heap/mark-compact.h" | 11 #include "src/heap/mark-compact.h" |
| 10 #include "src/objects.h" | 12 #include "src/objects.h" |
| 11 | 13 |
| 12 namespace v8 { | 14 namespace v8 { |
| 13 namespace internal { | 15 namespace internal { |
| 14 | 16 |
| 15 | |
| 16 class IncrementalMarking { | 17 class IncrementalMarking { |
| 17 public: | 18 public: |
| 18 enum State { STOPPED, SWEEPING, MARKING, COMPLETE }; | 19 enum State { STOPPED, SWEEPING, MARKING, COMPLETE }; |
| 19 | 20 |
| 20 enum CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD }; | 21 enum CompletionAction { GC_VIA_STACK_GUARD, NO_GC_VIA_STACK_GUARD }; |
| 21 | 22 |
| 22 enum ForceMarkingAction { FORCE_MARKING, DO_NOT_FORCE_MARKING }; | 23 enum ForceMarkingAction { FORCE_MARKING, DO_NOT_FORCE_MARKING }; |
| 23 | 24 |
| 24 enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION }; | 25 enum ForceCompletionAction { FORCE_COMPLETION, DO_NOT_FORCE_COMPLETION }; |
| 25 | 26 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 } | 191 } |
| 191 | 192 |
| 192 void ClearIdleMarkingDelayCounter(); | 193 void ClearIdleMarkingDelayCounter(); |
| 193 | 194 |
| 194 bool IsIdleMarkingDelayCounterLimitReached(); | 195 bool IsIdleMarkingDelayCounterLimitReached(); |
| 195 | 196 |
| 196 INLINE(static void MarkObject(Heap* heap, HeapObject* object)); | 197 INLINE(static void MarkObject(Heap* heap, HeapObject* object)); |
| 197 | 198 |
| 198 Heap* heap() const { return heap_; } | 199 Heap* heap() const { return heap_; } |
| 199 | 200 |
| 201 IncrementalMarkingJob* incremental_marking_job() { |
| 202 return &incremental_marking_job_; |
| 203 } |
| 204 |
| 200 private: | 205 private: |
| 201 int64_t SpaceLeftInOldSpace(); | 206 int64_t SpaceLeftInOldSpace(); |
| 202 | 207 |
| 203 void SpeedUp(); | 208 void SpeedUp(); |
| 204 | 209 |
| 205 void ResetStepCounters(); | 210 void ResetStepCounters(); |
| 206 | 211 |
| 207 void StartMarking(); | 212 void StartMarking(); |
| 208 | 213 |
| 209 void ActivateIncrementalWriteBarrier(PagedSpace* space); | 214 void ActivateIncrementalWriteBarrier(PagedSpace* space); |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 248 int unscanned_bytes_of_large_object_; | 253 int unscanned_bytes_of_large_object_; |
| 249 | 254 |
| 250 bool was_activated_; | 255 bool was_activated_; |
| 251 | 256 |
| 252 bool weak_closure_was_overapproximated_; | 257 bool weak_closure_was_overapproximated_; |
| 253 | 258 |
| 254 int weak_closure_approximation_rounds_; | 259 int weak_closure_approximation_rounds_; |
| 255 | 260 |
| 256 GCRequestType request_type_; | 261 GCRequestType request_type_; |
| 257 | 262 |
| 263 IncrementalMarkingJob incremental_marking_job_; |
| 264 |
| 258 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 265 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 259 }; | 266 }; |
| 260 } | 267 } |
| 261 } // namespace v8::internal | 268 } // namespace v8::internal |
| 262 | 269 |
| 263 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 270 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
| OLD | NEW |