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/incremental-marking-job.h" | 10 #include "src/heap/incremental-marking-job.h" |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 void Finalize(); | 96 void Finalize(); |
97 | 97 |
98 void Stop(); | 98 void Stop(); |
99 | 99 |
100 void OverApproximateWeakClosure(CompletionAction action); | 100 void OverApproximateWeakClosure(CompletionAction action); |
101 | 101 |
102 void MarkingComplete(CompletionAction action); | 102 void MarkingComplete(CompletionAction action); |
103 | 103 |
104 void Epilogue(); | 104 void Epilogue(); |
105 | 105 |
| 106 // Performs incremental marking steps of step_size_in_bytes as long as |
| 107 // deadline_ins_ms is not reached. step_size_in_bytes can be 0 to compute |
| 108 // an estimate increment. Returns the remaining time that cannot be used |
| 109 // for incremental marking anymore because a single step would exceed the |
| 110 // deadline. |
| 111 double AdvanceIncrementalMarking(intptr_t step_size_in_bytes, |
| 112 double deadline_in_ms, |
| 113 StepActions step_actions); |
| 114 |
106 // It's hard to know how much work the incremental marker should do to make | 115 // It's hard to know how much work the incremental marker should do to make |
107 // progress in the face of the mutator creating new work for it. We start | 116 // progress in the face of the mutator creating new work for it. We start |
108 // of at a moderate rate of work and gradually increase the speed of the | 117 // of at a moderate rate of work and gradually increase the speed of the |
109 // incremental marker until it completes. | 118 // incremental marker until it completes. |
110 // Do some marking every time this much memory has been allocated or that many | 119 // Do some marking every time this much memory has been allocated or that many |
111 // heavy (color-checking) write barriers have been invoked. | 120 // heavy (color-checking) write barriers have been invoked. |
112 static const intptr_t kAllocatedThreshold = 65536; | 121 static const intptr_t kAllocatedThreshold = 65536; |
113 static const intptr_t kWriteBarriersInvokedThreshold = 32768; | 122 static const intptr_t kWriteBarriersInvokedThreshold = 32768; |
114 // Start off by marking this many times more memory than has been allocated. | 123 // Start off by marking this many times more memory than has been allocated. |
115 static const intptr_t kInitialMarkingSpeed = 1; | 124 static const intptr_t kInitialMarkingSpeed = 1; |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 GCRequestType request_type_; | 273 GCRequestType request_type_; |
265 | 274 |
266 IncrementalMarkingJob incremental_marking_job_; | 275 IncrementalMarkingJob incremental_marking_job_; |
267 | 276 |
268 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 277 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
269 }; | 278 }; |
270 } | 279 } |
271 } // namespace v8::internal | 280 } // namespace v8::internal |
272 | 281 |
273 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ | 282 #endif // V8_HEAP_INCREMENTAL_MARKING_H_ |
OLD | NEW |