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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 static const size_t kMaxIdleMarkingDelayCounter = 3; | 139 static const size_t kMaxIdleMarkingDelayCounter = 3; |
140 | 140 |
141 void FinalizeSweeping(); | 141 void FinalizeSweeping(); |
142 | 142 |
143 void OldSpaceStep(intptr_t allocated); | 143 void OldSpaceStep(intptr_t allocated); |
144 | 144 |
145 intptr_t Step(intptr_t allocated, CompletionAction action, | 145 intptr_t Step(intptr_t allocated, CompletionAction action, |
146 ForceMarkingAction marking = DO_NOT_FORCE_MARKING, | 146 ForceMarkingAction marking = DO_NOT_FORCE_MARKING, |
147 ForceCompletionAction completion = FORCE_COMPLETION); | 147 ForceCompletionAction completion = FORCE_COMPLETION); |
148 | 148 |
149 inline void RestartIfNotMarking() { | 149 inline void RestartIfNotMarking(); |
150 if (state_ == COMPLETE) { | |
151 state_ = MARKING; | |
152 if (FLAG_trace_incremental_marking) { | |
153 PrintF("[IncrementalMarking] Restarting (new grey objects)\n"); | |
154 } | |
155 } | |
156 } | |
157 | 150 |
158 static void RecordWriteFromCode(HeapObject* obj, Object** slot, | 151 static void RecordWriteFromCode(HeapObject* obj, Object** slot, |
159 Isolate* isolate); | 152 Isolate* isolate); |
160 | 153 |
161 static void RecordWriteOfCodeEntryFromCode(JSFunction* host, Object** slot, | 154 static void RecordWriteOfCodeEntryFromCode(JSFunction* host, Object** slot, |
162 Isolate* isolate); | 155 Isolate* isolate); |
163 | 156 |
164 // Record a slot for compaction. Returns false for objects that are | 157 // Record a slot for compaction. Returns false for objects that are |
165 // guaranteed to be rescanned or not guaranteed to survive. | 158 // guaranteed to be rescanned or not guaranteed to survive. |
166 // | 159 // |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 GCRequestType request_type_; | 325 GCRequestType request_type_; |
333 | 326 |
334 IncrementalMarkingJob incremental_marking_job_; | 327 IncrementalMarkingJob incremental_marking_job_; |
335 | 328 |
336 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 329 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
337 }; | 330 }; |
338 } // namespace internal | 331 } // namespace internal |
339 } // namespace v8 | 332 } // namespace v8 |
340 | 333 |
341 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 334 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |