OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 explicit IncrementalMarking(Heap* heap); | 49 explicit IncrementalMarking(Heap* heap); |
50 | 50 |
51 void TearDown(); | 51 void TearDown(); |
52 | 52 |
53 State state() { | 53 State state() { |
54 ASSERT(state_ == STOPPED || FLAG_incremental_marking); | 54 ASSERT(state_ == STOPPED || FLAG_incremental_marking); |
55 return state_; | 55 return state_; |
56 } | 56 } |
57 | 57 |
58 bool should_hurry() { return should_hurry_; } | 58 bool should_hurry() { return should_hurry_; } |
| 59 void set_should_hurry(bool val) { should_hurry_ = val; } |
59 | 60 |
60 inline bool IsStopped() { return state() == STOPPED; } | 61 inline bool IsStopped() { return state() == STOPPED; } |
61 | 62 |
62 INLINE(bool IsMarking()) { return state() >= MARKING; } | 63 INLINE(bool IsMarking()) { return state() >= MARKING; } |
63 | 64 |
64 inline bool IsMarkingIncomplete() { return state() == MARKING; } | 65 inline bool IsMarkingIncomplete() { return state() == MARKING; } |
65 | 66 |
66 bool WorthActivating(); | 67 bool WorthActivating(); |
67 | 68 |
68 void Start(); | 69 void Start(); |
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
209 no_marking_scope_depth_++; | 210 no_marking_scope_depth_++; |
210 } | 211 } |
211 | 212 |
212 void LeaveNoMarkingScope() { | 213 void LeaveNoMarkingScope() { |
213 no_marking_scope_depth_--; | 214 no_marking_scope_depth_--; |
214 } | 215 } |
215 | 216 |
216 void UncommitMarkingDeque(); | 217 void UncommitMarkingDeque(); |
217 | 218 |
218 private: | 219 private: |
219 void set_should_hurry(bool val) { | |
220 should_hurry_ = val; | |
221 } | |
222 | |
223 int64_t SpaceLeftInOldSpace(); | 220 int64_t SpaceLeftInOldSpace(); |
224 | 221 |
225 void ResetStepCounters(); | 222 void ResetStepCounters(); |
226 | 223 |
227 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; | 224 enum CompactionFlag { ALLOW_COMPACTION, PREVENT_COMPACTION }; |
228 | 225 |
229 void StartMarking(CompactionFlag flag); | 226 void StartMarking(CompactionFlag flag); |
230 | 227 |
231 void ActivateIncrementalWriteBarrier(PagedSpace* space); | 228 void ActivateIncrementalWriteBarrier(PagedSpace* space); |
232 static void ActivateIncrementalWriteBarrier(NewSpace* space); | 229 static void ActivateIncrementalWriteBarrier(NewSpace* space); |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 intptr_t allocated_; | 266 intptr_t allocated_; |
270 | 267 |
271 int no_marking_scope_depth_; | 268 int no_marking_scope_depth_; |
272 | 269 |
273 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 270 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
274 }; | 271 }; |
275 | 272 |
276 } } // namespace v8::internal | 273 } } // namespace v8::internal |
277 | 274 |
278 #endif // V8_INCREMENTAL_MARKING_H_ | 275 #endif // V8_INCREMENTAL_MARKING_H_ |
OLD | NEW |