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 #include "src/heap/incremental-marking.h" | 5 #include "src/heap/incremental-marking.h" |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/compilation-cache.h" | 8 #include "src/compilation-cache.h" |
9 #include "src/conversions.h" | 9 #include "src/conversions.h" |
10 #include "src/heap/gc-idle-time-handler.h" | 10 #include "src/heap/gc-idle-time-handler.h" |
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
270 Marking::MarkBlack(mark_bit); | 270 Marking::MarkBlack(mark_bit); |
271 MemoryChunk::IncrementLiveBytesFromGC(heap_object, heap_object->Size()); | 271 MemoryChunk::IncrementLiveBytesFromGC(heap_object, heap_object->Size()); |
272 return true; | 272 return true; |
273 } | 273 } |
274 return false; | 274 return false; |
275 } | 275 } |
276 }; | 276 }; |
277 | 277 |
278 void IncrementalMarking::IterateBlackObject(HeapObject* object) { | 278 void IncrementalMarking::IterateBlackObject(HeapObject* object) { |
279 if (IsMarking() && Marking::IsBlack(Marking::MarkBitFrom(object))) { | 279 if (IsMarking() && Marking::IsBlack(Marking::MarkBitFrom(object))) { |
| 280 Page* page = Page::FromAddress(object->address()); |
| 281 if ((page->owner() != nullptr) && (page->owner()->identity() == LO_SPACE)) { |
| 282 // IterateBlackObject requires us to visit the hole object. |
| 283 page->ResetProgressBar(); |
| 284 } |
280 IncrementalMarkingMarkingVisitor::IterateBody(object->map(), object); | 285 IncrementalMarkingMarkingVisitor::IterateBody(object->map(), object); |
281 } | 286 } |
282 } | 287 } |
283 | 288 |
284 class IncrementalMarkingRootMarkingVisitor : public ObjectVisitor { | 289 class IncrementalMarkingRootMarkingVisitor : public ObjectVisitor { |
285 public: | 290 public: |
286 explicit IncrementalMarkingRootMarkingVisitor( | 291 explicit IncrementalMarkingRootMarkingVisitor( |
287 IncrementalMarking* incremental_marking) | 292 IncrementalMarking* incremental_marking) |
288 : heap_(incremental_marking->heap()) {} | 293 : heap_(incremental_marking->heap()) {} |
289 | 294 |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1240 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1245 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1241 idle_marking_delay_counter_++; | 1246 idle_marking_delay_counter_++; |
1242 } | 1247 } |
1243 | 1248 |
1244 | 1249 |
1245 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1250 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1246 idle_marking_delay_counter_ = 0; | 1251 idle_marking_delay_counter_ = 0; |
1247 } | 1252 } |
1248 } // namespace internal | 1253 } // namespace internal |
1249 } // namespace v8 | 1254 } // namespace v8 |
OLD | NEW |