| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 ASSERT(!Marking::IsImpossible(mark_bit)); | 168 ASSERT(!Marking::IsImpossible(mark_bit)); |
| 169 if (mark_bit.Get()) { | 169 if (mark_bit.Get()) { |
| 170 // Grey or black: Keep the color. | 170 // Grey or black: Keep the color. |
| 171 return false; | 171 return false; |
| 172 } | 172 } |
| 173 mark_bit.Set(); | 173 mark_bit.Set(); |
| 174 ASSERT(Marking::IsBlack(mark_bit)); | 174 ASSERT(Marking::IsBlack(mark_bit)); |
| 175 return true; | 175 return true; |
| 176 } | 176 } |
| 177 | 177 |
| 178 // Marks the object grey and pushes it on the marking stack. | |
| 179 // Returns true if object needed marking and false otherwise. | |
| 180 // This is for incremental marking only. | |
| 181 INLINE(bool MarkObjectAndPush(HeapObject* obj)); | |
| 182 | |
| 183 // Marks the object black without pushing it on the marking stack. | |
| 184 // Returns true if object needed marking and false otherwise. | |
| 185 // This is for incremental marking only. | |
| 186 INLINE(bool MarkObjectWithoutPush(HeapObject* obj)); | |
| 187 | |
| 188 inline int steps_count() { | 178 inline int steps_count() { |
| 189 return steps_count_; | 179 return steps_count_; |
| 190 } | 180 } |
| 191 | 181 |
| 192 inline double steps_took() { | 182 inline double steps_took() { |
| 193 return steps_took_; | 183 return steps_took_; |
| 194 } | 184 } |
| 195 | 185 |
| 196 inline double longest_step() { | 186 inline double longest_step() { |
| 197 return longest_step_; | 187 return longest_step_; |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 void EnsureMarkingDequeIsCommitted(); | 258 void EnsureMarkingDequeIsCommitted(); |
| 269 | 259 |
| 270 Heap* heap_; | 260 Heap* heap_; |
| 271 | 261 |
| 272 State state_; | 262 State state_; |
| 273 bool is_compacting_; | 263 bool is_compacting_; |
| 274 | 264 |
| 275 VirtualMemory* marking_deque_memory_; | 265 VirtualMemory* marking_deque_memory_; |
| 276 bool marking_deque_memory_committed_; | 266 bool marking_deque_memory_committed_; |
| 277 MarkingDeque marking_deque_; | 267 MarkingDeque marking_deque_; |
| 278 Marker<IncrementalMarking> marker_; | |
| 279 | 268 |
| 280 int steps_count_; | 269 int steps_count_; |
| 281 double steps_took_; | 270 double steps_took_; |
| 282 double longest_step_; | 271 double longest_step_; |
| 283 int64_t old_generation_space_available_at_start_of_incremental_; | 272 int64_t old_generation_space_available_at_start_of_incremental_; |
| 284 int64_t old_generation_space_used_at_start_of_incremental_; | 273 int64_t old_generation_space_used_at_start_of_incremental_; |
| 285 int steps_count_since_last_gc_; | 274 int steps_count_since_last_gc_; |
| 286 double steps_took_since_last_gc_; | 275 double steps_took_since_last_gc_; |
| 287 int64_t bytes_rescanned_; | 276 int64_t bytes_rescanned_; |
| 288 bool should_hurry_; | 277 bool should_hurry_; |
| 289 int allocation_marking_factor_; | 278 int allocation_marking_factor_; |
| 290 intptr_t bytes_scanned_; | 279 intptr_t bytes_scanned_; |
| 291 intptr_t allocated_; | 280 intptr_t allocated_; |
| 292 | 281 |
| 293 int no_marking_scope_depth_; | 282 int no_marking_scope_depth_; |
| 294 | 283 |
| 295 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); | 284 DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalMarking); |
| 296 }; | 285 }; |
| 297 | 286 |
| 298 } } // namespace v8::internal | 287 } } // namespace v8::internal |
| 299 | 288 |
| 300 #endif // V8_INCREMENTAL_MARKING_H_ | 289 #endif // V8_INCREMENTAL_MARKING_H_ |
| OLD | NEW |