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/cancelable-task.h" |
9 #include "src/execution.h" | 9 #include "src/execution.h" |
10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 // This is the upper bound for how many times we allow finalization of | 175 // This is the upper bound for how many times we allow finalization of |
176 // incremental marking to be postponed. | 176 // incremental marking to be postponed. |
177 static const int kMaxIdleMarkingDelayCounter = 3; | 177 static const int kMaxIdleMarkingDelayCounter = 3; |
178 | 178 |
179 #ifndef DEBUG | 179 #ifndef DEBUG |
180 static const intptr_t kActivationThreshold = 8 * MB; | 180 static const intptr_t kActivationThreshold = 8 * MB; |
181 #else | 181 #else |
182 static const intptr_t kActivationThreshold = 0; | 182 static const intptr_t kActivationThreshold = 0; |
183 #endif | 183 #endif |
184 | 184 |
| 185 #ifdef V8_CONCURRENT_MARKING |
| 186 static const MarkBit::AccessMode kAtomicity = MarkBit::AccessMode::ATOMIC; |
| 187 #else |
| 188 static const MarkBit::AccessMode kAtomicity = MarkBit::AccessMode::NON_ATOMIC; |
| 189 #endif |
| 190 |
185 void FinalizeSweeping(); | 191 void FinalizeSweeping(); |
186 | 192 |
187 size_t Step(size_t bytes_to_process, CompletionAction action, | 193 size_t Step(size_t bytes_to_process, CompletionAction action, |
188 ForceCompletionAction completion, StepOrigin step_origin); | 194 ForceCompletionAction completion, StepOrigin step_origin); |
189 | 195 |
190 inline void RestartIfNotMarking(); | 196 inline void RestartIfNotMarking(); |
191 | 197 |
192 static void RecordWriteFromCode(HeapObject* obj, Object** slot, | 198 static void RecordWriteFromCode(HeapObject* obj, Object** slot, |
193 Isolate* isolate); | 199 Isolate* isolate); |
194 | 200 |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 | 350 |
345 Observer new_generation_observer_; | 351 Observer new_generation_observer_; |
346 Observer old_generation_observer_; | 352 Observer old_generation_observer_; |
347 | 353 |
348 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 354 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
349 }; | 355 }; |
350 } // namespace internal | 356 } // namespace internal |
351 } // namespace v8 | 357 } // namespace v8 |
352 | 358 |
353 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 359 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |