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 2592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2603 | 2603 |
2604 heap()->incremental_marking()->UpdateMarkingDequeAfterScavenge(); | 2604 heap()->incremental_marking()->UpdateMarkingDequeAfterScavenge(); |
2605 | 2605 |
2606 { | 2606 { |
2607 TRACE_GC(heap()->tracer(), GCTracer::Scope::MINOR_MC_CLEAR_LIVENESS); | 2607 TRACE_GC(heap()->tracer(), GCTracer::Scope::MINOR_MC_CLEAR_LIVENESS); |
2608 for (Page* p : PageRange(heap()->new_space()->FromSpaceStart(), | 2608 for (Page* p : PageRange(heap()->new_space()->FromSpaceStart(), |
2609 heap()->new_space()->FromSpaceEnd())) { | 2609 heap()->new_space()->FromSpaceEnd())) { |
2610 marking_state(p).ClearLiveness(); | 2610 marking_state(p).ClearLiveness(); |
2611 } | 2611 } |
2612 } | 2612 } |
| 2613 |
| 2614 heap()->account_external_memory_concurrently_freed(); |
2613 } | 2615 } |
2614 | 2616 |
2615 void MinorMarkCompactCollector::ClearNonLiveReferences() { | 2617 void MinorMarkCompactCollector::ClearNonLiveReferences() { |
2616 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_CLEAR); | 2618 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_CLEAR); |
2617 | 2619 |
2618 { | 2620 { |
2619 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_CLEAR_STRING_TABLE); | 2621 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_CLEAR_STRING_TABLE); |
2620 // Internalized strings are always stored in old space, so there is no need | 2622 // Internalized strings are always stored in old space, so there is no need |
2621 // to clean them here. | 2623 // to clean them here. |
2622 YoungGenerationExternalStringTableCleaner external_visitor(*this); | 2624 YoungGenerationExternalStringTableCleaner external_visitor(*this); |
(...skipping 1898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4521 // The target is always in old space, we don't have to record the slot in | 4523 // The target is always in old space, we don't have to record the slot in |
4522 // the old-to-new remembered set. | 4524 // the old-to-new remembered set. |
4523 DCHECK(!heap()->InNewSpace(target)); | 4525 DCHECK(!heap()->InNewSpace(target)); |
4524 RecordRelocSlot(host, &rinfo, target); | 4526 RecordRelocSlot(host, &rinfo, target); |
4525 } | 4527 } |
4526 } | 4528 } |
4527 } | 4529 } |
4528 | 4530 |
4529 } // namespace internal | 4531 } // namespace internal |
4530 } // namespace v8 | 4532 } // namespace v8 |
OLD | NEW |