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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 } | 55 } |
56 | 56 |
57 GCRequestType request_type() const { return request_type_; } | 57 GCRequestType request_type() const { return request_type_; } |
58 | 58 |
59 bool WorthActivating(); | 59 bool WorthActivating(); |
60 | 60 |
61 bool ShouldActivate(); | 61 bool ShouldActivate(); |
62 | 62 |
63 bool WasActivated(); | 63 bool WasActivated(); |
64 | 64 |
65 void Start(); | 65 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; |
| 66 |
| 67 void Start(CompactionFlag flag = ALLOW_COMPACTION); |
66 | 68 |
67 void Stop(); | 69 void Stop(); |
68 | 70 |
69 void MarkObjectGroups(); | 71 void MarkObjectGroups(); |
70 | 72 |
71 void PrepareForScavenge(); | 73 void PrepareForScavenge(); |
72 | 74 |
73 void UpdateMarkingDequeAfterScavenge(); | 75 void UpdateMarkingDequeAfterScavenge(); |
74 | 76 |
75 void Hurry(); | 77 void Hurry(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 196 |
195 Heap* heap() const { return heap_; } | 197 Heap* heap() const { return heap_; } |
196 | 198 |
197 private: | 199 private: |
198 int64_t SpaceLeftInOldSpace(); | 200 int64_t SpaceLeftInOldSpace(); |
199 | 201 |
200 void SpeedUp(); | 202 void SpeedUp(); |
201 | 203 |
202 void ResetStepCounters(); | 204 void ResetStepCounters(); |
203 | 205 |
204 void StartMarking(); | 206 void StartMarking(CompactionFlag flag); |
205 | 207 |
206 void ActivateIncrementalWriteBarrier(PagedSpace* space); | 208 void ActivateIncrementalWriteBarrier(PagedSpace* space); |
207 static void ActivateIncrementalWriteBarrier(NewSpace* space); | 209 static void ActivateIncrementalWriteBarrier(NewSpace* space); |
208 void ActivateIncrementalWriteBarrier(); | 210 void ActivateIncrementalWriteBarrier(); |
209 | 211 |
210 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); | 212 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); |
211 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); | 213 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); |
212 void DeactivateIncrementalWriteBarrier(); | 214 void DeactivateIncrementalWriteBarrier(); |
213 | 215 |
214 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking, | 216 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking, |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
251 int weak_closure_approximation_rounds_; | 253 int weak_closure_approximation_rounds_; |
252 | 254 |
253 GCRequestType request_type_; | 255 GCRequestType request_type_; |
254 | 256 |
255 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 257 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
256 }; | 258 }; |
257 } | 259 } |
258 } // namespace v8::internal | 260 } // namespace v8::internal |
259 | 261 |
260 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 262 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |