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 3422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3433 } | 3433 } |
3434 | 3434 |
3435 void MarkCompactCollector::EvacuateNewSpaceAndCandidates() { | 3435 void MarkCompactCollector::EvacuateNewSpaceAndCandidates() { |
3436 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE); | 3436 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE); |
3437 Heap::RelocationLock relocation_lock(heap()); | 3437 Heap::RelocationLock relocation_lock(heap()); |
3438 | 3438 |
3439 { | 3439 { |
3440 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE_COPY); | 3440 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_EVACUATE_COPY); |
3441 EvacuationScope evacuation_scope(this); | 3441 EvacuationScope evacuation_scope(this); |
3442 | 3442 |
3443 heap()->store_buffer()->MoveAllEntriesToRememberedSet(); | |
Hannes Payer (out of office)
2016/10/28 07:15:04
Instead of doing this, we could also filter out di
| |
3444 | |
3443 EvacuateNewSpacePrologue(); | 3445 EvacuateNewSpacePrologue(); |
3444 EvacuatePagesInParallel(); | 3446 EvacuatePagesInParallel(); |
3445 heap()->new_space()->set_age_mark(heap()->new_space()->top()); | 3447 heap()->new_space()->set_age_mark(heap()->new_space()->top()); |
3446 } | 3448 } |
3447 | 3449 |
3448 UpdatePointersAfterEvacuation(); | 3450 UpdatePointersAfterEvacuation(); |
3449 | 3451 |
3450 if (!heap()->new_space()->Rebalance()) { | 3452 if (!heap()->new_space()->Rebalance()) { |
3451 FatalProcessOutOfMemory("NewSpace::Rebalance"); | 3453 FatalProcessOutOfMemory("NewSpace::Rebalance"); |
3452 } | 3454 } |
(...skipping 473 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3926 // The target is always in old space, we don't have to record the slot in | 3928 // The target is always in old space, we don't have to record the slot in |
3927 // the old-to-new remembered set. | 3929 // the old-to-new remembered set. |
3928 DCHECK(!heap()->InNewSpace(target)); | 3930 DCHECK(!heap()->InNewSpace(target)); |
3929 RecordRelocSlot(host, &rinfo, target); | 3931 RecordRelocSlot(host, &rinfo, target); |
3930 } | 3932 } |
3931 } | 3933 } |
3932 } | 3934 } |
3933 | 3935 |
3934 } // namespace internal | 3936 } // namespace internal |
3935 } // namespace v8 | 3937 } // namespace v8 |
OLD | NEW |