Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: src/heap/mark-compact.cc

Issue 2735803005: [heap] Start concurrent marking simultaneously with incremental marking. (Closed)
Patch Set: tweak Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« src/heap/heap.cc ('K') | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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"
11 #include "src/compilation-cache.h" 11 #include "src/compilation-cache.h"
12 #include "src/deoptimizer.h" 12 #include "src/deoptimizer.h"
13 #include "src/execution.h" 13 #include "src/execution.h"
14 #include "src/frames-inl.h" 14 #include "src/frames-inl.h"
15 #include "src/gdb-jit.h" 15 #include "src/gdb-jit.h"
16 #include "src/global-handles.h" 16 #include "src/global-handles.h"
17 #include "src/heap/array-buffer-tracker.h" 17 #include "src/heap/array-buffer-tracker.h"
18 #include "src/heap/concurrent-marking.h"
18 #include "src/heap/gc-tracer.h" 19 #include "src/heap/gc-tracer.h"
19 #include "src/heap/incremental-marking.h" 20 #include "src/heap/incremental-marking.h"
20 #include "src/heap/mark-compact-inl.h" 21 #include "src/heap/mark-compact-inl.h"
21 #include "src/heap/object-stats.h" 22 #include "src/heap/object-stats.h"
22 #include "src/heap/objects-visiting-inl.h" 23 #include "src/heap/objects-visiting-inl.h"
23 #include "src/heap/objects-visiting.h" 24 #include "src/heap/objects-visiting.h"
24 #include "src/heap/page-parallel-job.h" 25 #include "src/heap/page-parallel-job.h"
25 #include "src/heap/spaces-inl.h" 26 #include "src/heap/spaces-inl.h"
26 #include "src/ic/ic.h" 27 #include "src/ic/ic.h"
27 #include "src/ic/stub-cache.h" 28 #include "src/ic/stub-cache.h"
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 EnsureSweepingCompleted(); 774 EnsureSweepingCompleted();
774 775
775 if (heap()->incremental_marking()->IsSweeping()) { 776 if (heap()->incremental_marking()->IsSweeping()) {
776 heap()->incremental_marking()->Stop(); 777 heap()->incremental_marking()->Stop();
777 } 778 }
778 779
779 // If concurrent unmapping tasks are still running, we should wait for 780 // If concurrent unmapping tasks are still running, we should wait for
780 // them here. 781 // them here.
781 heap()->memory_allocator()->unmapper()->WaitUntilCompleted(); 782 heap()->memory_allocator()->unmapper()->WaitUntilCompleted();
782 783
784 if (FLAG_concurrent_marking &&
Hannes Payer (out of office) 2017/03/08 12:58:50 Maybe we should have an EnsureMarkingCompleted() m
ulan 2017/03/10 16:45:27 Done.
785 heap()->concurrent_marking()->IsMarkingInProgress()) {
786 heap()->concurrent_marking()->WaitForTaskToComplete();
787 }
788
783 // Clear marking bits if incremental marking is aborted. 789 // Clear marking bits if incremental marking is aborted.
784 if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) { 790 if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) {
785 heap()->incremental_marking()->Stop(); 791 heap()->incremental_marking()->Stop();
786 heap()->incremental_marking()->AbortBlackAllocation(); 792 heap()->incremental_marking()->AbortBlackAllocation();
787 ClearMarkbits(); 793 ClearMarkbits();
788 AbortWeakCollections(); 794 AbortWeakCollections();
789 AbortWeakCells(); 795 AbortWeakCells();
790 AbortTransitionArrays(); 796 AbortTransitionArrays();
791 AbortCompaction(); 797 AbortCompaction();
792 heap_->local_embedder_heap_tracer()->AbortTracing(); 798 heap_->local_embedder_heap_tracer()->AbortTracing();
(...skipping 3229 matching lines...) Expand 10 before | Expand all | Expand 10 after
4022 // The target is always in old space, we don't have to record the slot in 4028 // The target is always in old space, we don't have to record the slot in
4023 // the old-to-new remembered set. 4029 // the old-to-new remembered set.
4024 DCHECK(!heap()->InNewSpace(target)); 4030 DCHECK(!heap()->InNewSpace(target));
4025 RecordRelocSlot(host, &rinfo, target); 4031 RecordRelocSlot(host, &rinfo, target);
4026 } 4032 }
4027 } 4033 }
4028 } 4034 }
4029 4035
4030 } // namespace internal 4036 } // namespace internal
4031 } // namespace v8 4037 } // namespace v8
OLDNEW
« src/heap/heap.cc ('K') | « src/heap/mark-compact.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698