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_INCREMENTAL_MARKING_H_ | 5 #ifndef V8_INCREMENTAL_MARKING_H_ |
6 #define V8_INCREMENTAL_MARKING_H_ | 6 #define V8_INCREMENTAL_MARKING_H_ |
7 | 7 |
8 | 8 |
9 #include "src/execution.h" | 9 #include "src/execution.h" |
10 #include "src/mark-compact.h" | 10 #include "src/mark-compact.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 // with the data that is entering the old space through promotion. | 84 // with the data that is entering the old space through promotion. |
85 static const intptr_t kFastMarking = 3; | 85 static const intptr_t kFastMarking = 3; |
86 // After this many steps we increase the marking/allocating factor. | 86 // After this many steps we increase the marking/allocating factor. |
87 static const intptr_t kMarkingSpeedAccellerationInterval = 1024; | 87 static const intptr_t kMarkingSpeedAccellerationInterval = 1024; |
88 // This is how much we increase the marking/allocating factor by. | 88 // This is how much we increase the marking/allocating factor by. |
89 static const intptr_t kMarkingSpeedAccelleration = 2; | 89 static const intptr_t kMarkingSpeedAccelleration = 2; |
90 static const intptr_t kMaxMarkingSpeed = 1000; | 90 static const intptr_t kMaxMarkingSpeed = 1000; |
91 | 91 |
92 void OldSpaceStep(intptr_t allocated); | 92 void OldSpaceStep(intptr_t allocated); |
93 | 93 |
94 void Step(intptr_t allocated, CompletionAction action); | 94 void Step(intptr_t allocated, CompletionAction action, |
| 95 bool force_marking = false); |
95 | 96 |
96 inline void RestartIfNotMarking() { | 97 inline void RestartIfNotMarking() { |
97 if (state_ == COMPLETE) { | 98 if (state_ == COMPLETE) { |
98 state_ = MARKING; | 99 state_ = MARKING; |
99 if (FLAG_trace_incremental_marking) { | 100 if (FLAG_trace_incremental_marking) { |
100 PrintF("[IncrementalMarking] Restarting (new grey objects)\n"); | 101 PrintF("[IncrementalMarking] Restarting (new grey objects)\n"); |
101 } | 102 } |
102 } | 103 } |
103 } | 104 } |
104 | 105 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 int no_marking_scope_depth_; | 229 int no_marking_scope_depth_; |
229 | 230 |
230 int unscanned_bytes_of_large_object_; | 231 int unscanned_bytes_of_large_object_; |
231 | 232 |
232 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 233 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
233 }; | 234 }; |
234 | 235 |
235 } } // namespace v8::internal | 236 } } // namespace v8::internal |
236 | 237 |
237 #endif // V8_INCREMENTAL_MARKING_H_ | 238 #endif // V8_INCREMENTAL_MARKING_H_ |
OLD | NEW |