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

Side by Side Diff: test/cctest/heap/heap-utils.cc

Issue 2498583002: [heap] Minor MC: Add marking (Closed)
Patch Set: Move to concurrent uncomitting of marking deque Created 4 years, 1 month 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
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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 "test/cctest/heap/heap-utils.h" 5 #include "test/cctest/heap/heap-utils.h"
6 6
7 #include "src/factory.h" 7 #include "src/factory.h"
8 #include "src/heap/heap-inl.h" 8 #include "src/heap/heap-inl.h"
9 #include "src/heap/incremental-marking.h" 9 #include "src/heap/incremental-marking.h"
10 #include "src/heap/mark-compact.h" 10 #include "src/heap/mark-compact.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 } 135 }
136 136
137 void SimulateFullSpace(v8::internal::NewSpace* space, 137 void SimulateFullSpace(v8::internal::NewSpace* space,
138 std::vector<Handle<FixedArray>>* out_handles) { 138 std::vector<Handle<FixedArray>>* out_handles) {
139 heap::FillCurrentPage(space, out_handles); 139 heap::FillCurrentPage(space, out_handles);
140 while (heap::FillUpOnePage(space, out_handles) || space->AddFreshPage()) { 140 while (heap::FillUpOnePage(space, out_handles) || space->AddFreshPage()) {
141 } 141 }
142 } 142 }
143 143
144 void SimulateIncrementalMarking(i::Heap* heap, bool force_completion) { 144 void SimulateIncrementalMarking(i::Heap* heap, bool force_completion) {
145 CHECK(FLAG_incremental_marking);
145 i::IncrementalMarking* marking = heap->incremental_marking(); 146 i::IncrementalMarking* marking = heap->incremental_marking();
146 i::MarkCompactCollector* collector = heap->mark_compact_collector(); 147 i::MarkCompactCollector* collector = heap->mark_compact_collector();
147 if (collector->sweeping_in_progress()) { 148 if (collector->sweeping_in_progress()) {
148 collector->EnsureSweepingCompleted(); 149 collector->EnsureSweepingCompleted();
149 } 150 }
150 if (marking->IsSweeping()) { 151 if (marking->IsSweeping()) {
151 marking->FinalizeSweeping(); 152 marking->FinalizeSweeping();
152 } 153 }
153 CHECK(marking->IsMarking() || marking->IsStopped() || marking->IsComplete()); 154 CHECK(marking->IsMarking() || marking->IsStopped() || marking->IsComplete());
154 if (marking->IsStopped()) { 155 if (marking->IsStopped()) {
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 int remaining = static_cast<int>(limit - top); 204 int remaining = static_cast<int>(limit - top);
204 space->heap()->CreateFillerObjectAt(top, remaining, 205 space->heap()->CreateFillerObjectAt(top, remaining,
205 ClearRecordedSlots::kNo); 206 ClearRecordedSlots::kNo);
206 space->SetTopAndLimit(nullptr, nullptr); 207 space->SetTopAndLimit(nullptr, nullptr);
207 } 208 }
208 } 209 }
209 210
210 } // namespace heap 211 } // namespace heap
211 } // namespace internal 212 } // namespace internal
212 } // namespace v8 213 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698