| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 allocation_marking_factor_ = kFastMarking; | 184 allocation_marking_factor_ = kFastMarking; |
| 185 } | 185 } |
| 186 } | 186 } |
| 187 } | 187 } |
| 188 | 188 |
| 189 private: | 189 private: |
| 190 void set_should_hurry(bool val) { | 190 void set_should_hurry(bool val) { |
| 191 should_hurry_ = val; | 191 should_hurry_ = val; |
| 192 } | 192 } |
| 193 | 193 |
| 194 void ResetStepCounters() { | 194 int64_t SpaceLeftInOldSpace(); |
| 195 steps_count_ = 0; | 195 |
| 196 steps_took_ = 0; | 196 void ResetStepCounters(); |
| 197 longest_step_ = 0.0; | |
| 198 steps_count_since_last_gc_ = 0; | |
| 199 steps_took_since_last_gc_ = 0; | |
| 200 bytes_rescanned_ = 0; | |
| 201 allocation_marking_factor_ = kInitialAllocationMarkingFactor; | |
| 202 } | |
| 203 | 197 |
| 204 void StartMarking(); | 198 void StartMarking(); |
| 205 | 199 |
| 206 static void ActivateIncrementalWriteBarrier(PagedSpace* space); | 200 static void ActivateIncrementalWriteBarrier(PagedSpace* space); |
| 207 static void ActivateIncrementalWriteBarrier(NewSpace* space); | 201 static void ActivateIncrementalWriteBarrier(NewSpace* space); |
| 208 void ActivateIncrementalWriteBarrier(); | 202 void ActivateIncrementalWriteBarrier(); |
| 209 | 203 |
| 210 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); | 204 static void DeactivateIncrementalWriteBarrierForSpace(PagedSpace* space); |
| 211 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); | 205 static void DeactivateIncrementalWriteBarrierForSpace(NewSpace* space); |
| 212 void DeactivateIncrementalWriteBarrier(); | 206 void DeactivateIncrementalWriteBarrier(); |
| 213 | 207 |
| 214 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking); | 208 static void SetOldSpacePageFlags(MemoryChunk* chunk, bool is_marking); |
| 215 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking); | 209 static void SetNewSpacePageFlags(NewSpacePage* chunk, bool is_marking); |
| 216 | 210 |
| 217 void EnsureMarkingDequeIsCommitted(); | 211 void EnsureMarkingDequeIsCommitted(); |
| 218 | 212 |
| 219 Heap* heap_; | 213 Heap* heap_; |
| 220 | 214 |
| 221 State state_; | 215 State state_; |
| 222 bool is_compacting_; | 216 bool is_compacting_; |
| 223 | 217 |
| 224 VirtualMemory* marking_deque_memory_; | 218 VirtualMemory* marking_deque_memory_; |
| 225 MarkingDeque marking_deque_; | 219 MarkingDeque marking_deque_; |
| 226 | 220 |
| 227 int steps_count_; | 221 int steps_count_; |
| 228 double steps_took_; | 222 double steps_took_; |
| 229 double longest_step_; | 223 double longest_step_; |
| 224 int64_t old_generation_space_available_at_start_of_incremental_; |
| 225 int64_t old_generation_space_used_at_start_of_incremental_; |
| 230 int steps_count_since_last_gc_; | 226 int steps_count_since_last_gc_; |
| 231 double steps_took_since_last_gc_; | 227 double steps_took_since_last_gc_; |
| 232 int64_t bytes_rescanned_; | 228 int64_t bytes_rescanned_; |
| 233 bool should_hurry_; | 229 bool should_hurry_; |
| 234 int allocation_marking_factor_; | 230 int allocation_marking_factor_; |
| 235 intptr_t allocated_; | 231 intptr_t allocated_; |
| 236 | 232 |
| 237 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 233 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 238 }; | 234 }; |
| 239 | 235 |
| 240 } } // namespace v8::internal | 236 } } // namespace v8::internal |
| 241 | 237 |
| 242 #endif // V8_INCREMENTAL_MARKING_H_ | 238 #endif // V8_INCREMENTAL_MARKING_H_ |
| OLD | NEW |