| 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 | 8 |
| 9 #include "src/execution.h" | 9 #include "src/execution.h" |
| 10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 } | 60 } |
| 61 | 61 |
| 62 GCRequestType request_type() const { return request_type_; } | 62 GCRequestType request_type() const { return request_type_; } |
| 63 | 63 |
| 64 bool WorthActivating(); | 64 bool WorthActivating(); |
| 65 | 65 |
| 66 bool ShouldActivate(); | 66 bool ShouldActivate(); |
| 67 | 67 |
| 68 bool WasActivated(); | 68 bool WasActivated(); |
| 69 | 69 |
| 70 void Start(); | 70 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; |
| 71 |
| 72 void Start(CompactionFlag flag = ALLOW_COMPACTION); |
| 71 | 73 |
| 72 void Stop(); | 74 void Stop(); |
| 73 | 75 |
| 74 void MarkObjectGroups(); | 76 void MarkObjectGroups(); |
| 75 | 77 |
| 76 void PrepareForScavenge(); | 78 void PrepareForScavenge(); |
| 77 | 79 |
| 78 void UpdateMarkingDequeAfterScavenge(); | 80 void UpdateMarkingDequeAfterScavenge(); |
| 79 | 81 |
| 80 void Hurry(); | 82 void Hurry(); |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 201 |
| 200 Heap* heap() const { return heap_; } | 202 Heap* heap() const { return heap_; } |
| 201 | 203 |
| 202 private: | 204 private: |
| 203 int64_t SpaceLeftInOldSpace(); | 205 int64_t SpaceLeftInOldSpace(); |
| 204 | 206 |
| 205 void SpeedUp(); | 207 void SpeedUp(); |
| 206 | 208 |
| 207 void ResetStepCounters(); | 209 void ResetStepCounters(); |
| 208 | 210 |
| 209 void StartMarking(); | 211 void StartMarking(CompactionFlag flag); |
| 210 | 212 |
| 211 void ActivateIncrementalWriteBarrier(PagedSpace* space); | 213 void ActivateIncrementalWriteBarrier(PagedSpace* space); |
| 212 static void ActivateIncrementalWriteBarrier(NewSpace* space); | 214 static void ActivateIncrementalWriteBarrier(NewSpace* space); |
| 213 void ActivateIncrementalWriteBarrier(); | 215 void ActivateIncrementalWriteBarrier(); |
| 214 | 216 |
| 215 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); | 217 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); |
| 216 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); | 218 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); |
| 217 void DeactivateIncrementalWriteBarrier(); | 219 void DeactivateIncrementalWriteBarrier(); |
| 218 | 220 |
| 219 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking, | 221 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 256 int weak_closure_approximation_rounds_; | 258 int weak_closure_approximation_rounds_; |
| 257 | 259 |
| 258 GCRequestType request_type_; | 260 GCRequestType request_type_; |
| 259 | 261 |
| 260 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 262 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 261 }; | 263 }; |
| 262 } | 264 } |
| 263 } // namespace v8::internal | 265 } // namespace v8::internal |
| 264 | 266 |
| 265 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 267 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
| OLD | NEW |