| 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/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
| 6 | 6 |
| 7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 4383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4394 void MinorMarkCompactCollector::UpdatePointersAfterEvacuation() { | 4394 void MinorMarkCompactCollector::UpdatePointersAfterEvacuation() { |
| 4395 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS); | 4395 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS); |
| 4396 | 4396 |
| 4397 PointersUpdatingVisitor updating_visitor; | 4397 PointersUpdatingVisitor updating_visitor; |
| 4398 | 4398 |
| 4399 { | 4399 { |
| 4400 TRACE_GC(heap()->tracer(), | 4400 TRACE_GC(heap()->tracer(), |
| 4401 GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_TO_NEW); | 4401 GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_TO_NEW); |
| 4402 UpdateToSpacePointersInParallel(heap_, &page_parallel_job_semaphore_, | 4402 UpdateToSpacePointersInParallel(heap_, &page_parallel_job_semaphore_, |
| 4403 *this); | 4403 *this); |
| 4404 // TODO(mlippautz): Iteration mode is not optimal as we process all | 4404 heap_->IterateRoots(&updating_visitor, VISIT_ALL_IN_MINOR_MC_UPDATE); |
| 4405 // global handles. Find a way to only process the ones related to new | |
| 4406 // space. | |
| 4407 heap_->IterateRoots(&updating_visitor, VISIT_ALL_IN_SWEEP_NEWSPACE); | |
| 4408 UpdatePointersInParallel<OLD_TO_NEW>(heap_, &page_parallel_job_semaphore_, | 4405 UpdatePointersInParallel<OLD_TO_NEW>(heap_, &page_parallel_job_semaphore_, |
| 4409 this); | 4406 this); |
| 4410 } | 4407 } |
| 4411 | 4408 |
| 4412 { | 4409 { |
| 4413 TRACE_GC(heap()->tracer(), | 4410 TRACE_GC(heap()->tracer(), |
| 4414 GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_WEAK); | 4411 GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_WEAK); |
| 4415 | 4412 |
| 4416 EvacuationWeakObjectRetainer evacuation_object_retainer; | 4413 EvacuationWeakObjectRetainer evacuation_object_retainer; |
| 4417 heap()->ProcessWeakListRoots(&evacuation_object_retainer); | 4414 heap()->ProcessWeakListRoots(&evacuation_object_retainer); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4638 // The target is always in old space, we don't have to record the slot in | 4635 // The target is always in old space, we don't have to record the slot in |
| 4639 // the old-to-new remembered set. | 4636 // the old-to-new remembered set. |
| 4640 DCHECK(!heap()->InNewSpace(target)); | 4637 DCHECK(!heap()->InNewSpace(target)); |
| 4641 RecordRelocSlot(host, &rinfo, target); | 4638 RecordRelocSlot(host, &rinfo, target); |
| 4642 } | 4639 } |
| 4643 } | 4640 } |
| 4644 } | 4641 } |
| 4645 | 4642 |
| 4646 } // namespace internal | 4643 } // namespace internal |
| 4647 } // namespace v8 | 4644 } // namespace v8 |
| OLD | NEW |