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