| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 165 |
| 166 inline int steps_count_since_last_gc() { | 166 inline int steps_count_since_last_gc() { |
| 167 return steps_count_since_last_gc_; | 167 return steps_count_since_last_gc_; |
| 168 } | 168 } |
| 169 | 169 |
| 170 inline double steps_took_since_last_gc() { | 170 inline double steps_took_since_last_gc() { |
| 171 return steps_took_since_last_gc_; | 171 return steps_took_since_last_gc_; |
| 172 } | 172 } |
| 173 | 173 |
| 174 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { | 174 inline void SetOldSpacePageFlags(MemoryChunk* chunk) { |
| 175 SetOldSpacePageFlags(chunk, IsMarking()); | 175 SetOldSpacePageFlags(chunk, IsMarking(), IsCompacting()); |
| 176 } | 176 } |
| 177 | 177 |
| 178 inline void SetNewSpacePageFlags(NewSpacePage* chunk) { | 178 inline void SetNewSpacePageFlags(NewSpacePage* chunk) { |
| 179 SetNewSpacePageFlags(chunk, IsMarking()); | 179 SetNewSpacePageFlags(chunk, IsMarking()); |
| 180 } | 180 } |
| 181 | 181 |
| 182 MarkingDeque* marking_deque() { return &marking_deque_; } | 182 MarkingDeque* marking_deque() { return &marking_deque_; } |
| 183 | 183 |
| 184 bool IsCompacting() { return IsMarking() && is_compacting_; } | 184 bool IsCompacting() { return IsMarking() && is_compacting_; } |
| 185 | 185 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 201 void set_should_hurry(bool val) { | 201 void set_should_hurry(bool val) { |
| 202 should_hurry_ = val; | 202 should_hurry_ = val; |
| 203 } | 203 } |
| 204 | 204 |
| 205 int64_t SpaceLeftInOldSpace(); | 205 int64_t SpaceLeftInOldSpace(); |
| 206 | 206 |
| 207 void ResetStepCounters(); | 207 void ResetStepCounters(); |
| 208 | 208 |
| 209 void StartMarking(); | 209 void StartMarking(); |
| 210 | 210 |
| 211 static void ActivateIncrementalWriteBarrier(PagedSpace* space); | 211 void ActivateIncrementalWriteBarrier(PagedSpace* space); |
| 212 static void ActivateIncrementalWriteBarrier(NewSpace* space); | 212 static void ActivateIncrementalWriteBarrier(NewSpace* space); |
| 213 void ActivateIncrementalWriteBarrier(); | 213 void ActivateIncrementalWriteBarrier(); |
| 214 | 214 |
| 215 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); | 215 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); |
| 216 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); | 216 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); |
| 217 void DeactivateIncrementalWriteBarrier(); | 217 void DeactivateIncrementalWriteBarrier(); |
| 218 | 218 |
| 219 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking); | 219 static void SetOldSpacePageFlags(MemoryChunk* chunk, |
| 220 bool is_marking, |
| 221 bool is_compacting); |
| 222 |
| 220 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking); | 223 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking); |
| 221 | 224 |
| 222 void EnsureMarkingDequeIsCommitted(); | 225 void EnsureMarkingDequeIsCommitted(); |
| 223 | 226 |
| 224 void VisitGlobalContext(Context* ctx, ObjectVisitor* v); | 227 void VisitGlobalContext(Context* ctx, ObjectVisitor* v); |
| 225 | 228 |
| 226 Heap* heap_; | 229 Heap* heap_; |
| 227 | 230 |
| 228 State state_; | 231 State state_; |
| 229 bool is_compacting_; | 232 bool is_compacting_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 242 bool should_hurry_; | 245 bool should_hurry_; |
| 243 int allocation_marking_factor_; | 246 int allocation_marking_factor_; |
| 244 intptr_t allocated_; | 247 intptr_t allocated_; |
| 245 | 248 |
| 246 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 249 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 247 }; | 250 }; |
| 248 | 251 |
| 249 } } // namespace v8::internal | 252 } } // namespace v8::internal |
| 250 | 253 |
| 251 #endif // V8_INCREMENTAL_MARKING_H_ | 254 #endif // V8_INCREMENTAL_MARKING_H_ |
| OLD | NEW |