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 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
303 } | 303 } |
304 }; | 304 }; |
305 | 305 |
306 void IncrementalMarking::IterateBlackObject(HeapObject* object) { | 306 void IncrementalMarking::IterateBlackObject(HeapObject* object) { |
307 if (IsMarking() && Marking::IsBlack(ObjectMarking::MarkBitFrom(object))) { | 307 if (IsMarking() && Marking::IsBlack(ObjectMarking::MarkBitFrom(object))) { |
308 Page* page = Page::FromAddress(object->address()); | 308 Page* page = Page::FromAddress(object->address()); |
309 if ((page->owner() != nullptr) && (page->owner()->identity() == LO_SPACE)) { | 309 if ((page->owner() != nullptr) && (page->owner()->identity() == LO_SPACE)) { |
310 // IterateBlackObject requires us to visit the whole object. | 310 // IterateBlackObject requires us to visit the whole object. |
311 page->ResetProgressBar(); | 311 page->ResetProgressBar(); |
312 } | 312 } |
313 IncrementalMarkingMarkingVisitor::IterateBody(object->map(), object); | 313 Map* map = object->map(); |
| 314 MarkGrey(heap_, map); |
| 315 IncrementalMarkingMarkingVisitor::IterateBody(map, object); |
314 } | 316 } |
315 } | 317 } |
316 | 318 |
317 class IncrementalMarkingRootMarkingVisitor : public ObjectVisitor { | 319 class IncrementalMarkingRootMarkingVisitor : public ObjectVisitor { |
318 public: | 320 public: |
319 explicit IncrementalMarkingRootMarkingVisitor( | 321 explicit IncrementalMarkingRootMarkingVisitor( |
320 IncrementalMarking* incremental_marking) | 322 IncrementalMarking* incremental_marking) |
321 : heap_(incremental_marking->heap()) {} | 323 : heap_(incremental_marking->heap()) {} |
322 | 324 |
323 void VisitPointer(Object** p) override { MarkObjectByPointer(p); } | 325 void VisitPointer(Object** p) override { MarkObjectByPointer(p); } |
(...skipping 932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1256 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { | 1258 void IncrementalMarking::IncrementIdleMarkingDelayCounter() { |
1257 idle_marking_delay_counter_++; | 1259 idle_marking_delay_counter_++; |
1258 } | 1260 } |
1259 | 1261 |
1260 | 1262 |
1261 void IncrementalMarking::ClearIdleMarkingDelayCounter() { | 1263 void IncrementalMarking::ClearIdleMarkingDelayCounter() { |
1262 idle_marking_delay_counter_ = 0; | 1264 idle_marking_delay_counter_ = 0; |
1263 } | 1265 } |
1264 } // namespace internal | 1266 } // namespace internal |
1265 } // namespace v8 | 1267 } // namespace v8 |
OLD | NEW |