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

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

Issue 2469273002: [heap] Exclude the owner of the linear allocation area from evacuation. (Closed)
Patch Set: 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 | « test/cctest/heap/heap-utils.h ('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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 } 187 }
188 188
189 void GcAndSweep(Heap* heap, AllocationSpace space) { 189 void GcAndSweep(Heap* heap, AllocationSpace space) {
190 heap->CollectGarbage(space, GarbageCollectionReason::kTesting); 190 heap->CollectGarbage(space, GarbageCollectionReason::kTesting);
191 if (heap->mark_compact_collector()->sweeping_in_progress()) { 191 if (heap->mark_compact_collector()->sweeping_in_progress()) {
192 heap->mark_compact_collector()->EnsureSweepingCompleted(); 192 heap->mark_compact_collector()->EnsureSweepingCompleted();
193 } 193 }
194 } 194 }
195 195
196 void ForceEvacuationCandidate(Page* page) {
197 CHECK(FLAG_manual_evacuation_candidates_selection);
198 page->SetFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING);
199 PagedSpace* space = static_cast<PagedSpace*>(page->owner());
200 Address top = space->top();
201 Address limit = space->limit();
202 if (top < limit && Page::FromAllocationAreaAddress(top) == page) {
203 // Create filler object to keep page iterable if it was iterable.
204 int remaining = static_cast<int>(limit - top);
205 space->heap()->CreateFillerObjectAt(top, remaining,
206 ClearRecordedSlots::kNo);
207 space->SetTopAndLimit(nullptr, nullptr);
208 }
209 }
210
196 } // namespace heap 211 } // namespace heap
197 } // namespace internal 212 } // namespace internal
198 } // namespace v8 213 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/heap/heap-utils.h ('k') | test/cctest/heap/test-array-buffer-tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698