| 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 793 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 804 if (heap_->UsingEmbedderHeapTracer()) { | 804 if (heap_->UsingEmbedderHeapTracer()) { |
| 805 heap_->embedder_heap_tracer()->AbortTracing(); | 805 heap_->embedder_heap_tracer()->AbortTracing(); |
| 806 } | 806 } |
| 807 marking_deque()->Clear(); | 807 marking_deque()->Clear(); |
| 808 was_marked_incrementally_ = false; | 808 was_marked_incrementally_ = false; |
| 809 } | 809 } |
| 810 | 810 |
| 811 if (!was_marked_incrementally_) { | 811 if (!was_marked_incrementally_) { |
| 812 if (heap_->UsingEmbedderHeapTracer()) { | 812 if (heap_->UsingEmbedderHeapTracer()) { |
| 813 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_PROLOGUE); | 813 TRACE_GC(heap()->tracer(), GCTracer::Scope::MC_MARK_WRAPPER_PROLOGUE); |
| 814 heap_->embedder_heap_tracer()->TracePrologue( | 814 heap_->embedder_heap_tracer()->TracePrologue(); |
| 815 heap_->embedder_reachable_reference_reporter()); | |
| 816 } | 815 } |
| 817 } | 816 } |
| 818 | 817 |
| 819 if (heap_->UsingEmbedderHeapTracer()) { | 818 if (heap_->UsingEmbedderHeapTracer()) { |
| 820 heap_->embedder_heap_tracer()->EnterFinalPause(); | 819 heap_->embedder_heap_tracer()->EnterFinalPause(); |
| 821 } | 820 } |
| 822 | 821 |
| 823 // Don't start compaction if we are in the middle of incremental | 822 // Don't start compaction if we are in the middle of incremental |
| 824 // marking cycle. We did not collect any slots. | 823 // marking cycle. We did not collect any slots. |
| 825 if (!FLAG_never_compact && !was_marked_incrementally_) { | 824 if (!FLAG_never_compact && !was_marked_incrementally_) { |
| (...skipping 3092 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3918 // The target is always in old space, we don't have to record the slot in | 3917 // The target is always in old space, we don't have to record the slot in |
| 3919 // the old-to-new remembered set. | 3918 // the old-to-new remembered set. |
| 3920 DCHECK(!heap()->InNewSpace(target)); | 3919 DCHECK(!heap()->InNewSpace(target)); |
| 3921 RecordRelocSlot(host, &rinfo, target); | 3920 RecordRelocSlot(host, &rinfo, target); |
| 3922 } | 3921 } |
| 3923 } | 3922 } |
| 3924 } | 3923 } |
| 3925 | 3924 |
| 3926 } // namespace internal | 3925 } // namespace internal |
| 3927 } // namespace v8 | 3926 } // namespace v8 |
| OLD | NEW |