| 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 2118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2129 // Mark all objects reachable (transitively) from objects on the marking | 2129 // Mark all objects reachable (transitively) from objects on the marking |
| 2130 // stack including references only considered in the atomic marking pause. | 2130 // stack including references only considered in the atomic marking pause. |
| 2131 void MarkCompactCollector::ProcessEphemeralMarking( | 2131 void MarkCompactCollector::ProcessEphemeralMarking( |
| 2132 ObjectVisitor* visitor, bool only_process_harmony_weak_collections) { | 2132 ObjectVisitor* visitor, bool only_process_harmony_weak_collections) { |
| 2133 DCHECK(marking_deque()->IsEmpty() && !marking_deque()->overflowed()); | 2133 DCHECK(marking_deque()->IsEmpty() && !marking_deque()->overflowed()); |
| 2134 bool work_to_do = true; | 2134 bool work_to_do = true; |
| 2135 while (work_to_do) { | 2135 while (work_to_do) { |
| 2136 if (!only_process_harmony_weak_collections) { | 2136 if (!only_process_harmony_weak_collections) { |
| 2137 if (heap_->local_embedder_heap_tracer()->InUse()) { | 2137 if (heap_->local_embedder_heap_tracer()->InUse()) { |
| 2138 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_TRACING); | 2138 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_TRACING); |
| 2139 heap_->local_embedder_heap_tracer()->RegisterWrappersWithRemoteTracer(); | |
| 2140 heap_->local_embedder_heap_tracer()->Trace( | 2139 heap_->local_embedder_heap_tracer()->Trace( |
| 2141 0, | 2140 0, |
| 2142 EmbedderHeapTracer::AdvanceTracingActions( | 2141 EmbedderHeapTracer::AdvanceTracingActions( |
| 2143 EmbedderHeapTracer::ForceCompletionAction::FORCE_COMPLETION)); | 2142 EmbedderHeapTracer::ForceCompletionAction::FORCE_COMPLETION)); |
| 2144 } else { | 2143 } else { |
| 2145 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_OBJECT_GROUPING); | 2144 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_OBJECT_GROUPING); |
| 2146 isolate()->global_handles()->IterateObjectGroups( | 2145 isolate()->global_handles()->IterateObjectGroups( |
| 2147 visitor, &IsUnmarkedHeapObjectWithHeap); | 2146 visitor, &IsUnmarkedHeapObjectWithHeap); |
| 2148 MarkImplicitRefGroups(&MarkCompactMarkingVisitor::MarkObject); | 2147 MarkImplicitRefGroups(&MarkCompactMarkingVisitor::MarkObject); |
| 2149 } | 2148 } |
| (...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4082 // The target is always in old space, we don't have to record the slot in | 4081 // The target is always in old space, we don't have to record the slot in |
| 4083 // the old-to-new remembered set. | 4082 // the old-to-new remembered set. |
| 4084 DCHECK(!heap()->InNewSpace(target)); | 4083 DCHECK(!heap()->InNewSpace(target)); |
| 4085 RecordRelocSlot(host, &rinfo, target); | 4084 RecordRelocSlot(host, &rinfo, target); |
| 4086 } | 4085 } |
| 4087 } | 4086 } |
| 4088 } | 4087 } |
| 4089 | 4088 |
| 4090 } // namespace internal | 4089 } // namespace internal |
| 4091 } // namespace v8 | 4090 } // namespace v8 |
| OLD | NEW |