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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/heap-utils.cc
diff --git a/test/cctest/heap/heap-utils.cc b/test/cctest/heap/heap-utils.cc
index 96665126832e5e13d30d0b64d71142c44f6510a1..c2067172aad98dbe0b668cbbc1f5d9f69dfe8d6c 100644
--- a/test/cctest/heap/heap-utils.cc
+++ b/test/cctest/heap/heap-utils.cc
@@ -193,6 +193,21 @@ void GcAndSweep(Heap* heap, AllocationSpace space) {
}
}
+void ForceEvacuationCandidate(Page* page) {
+ CHECK(FLAG_manual_evacuation_candidates_selection);
+ page->SetFlag(MemoryChunk::FORCE_EVACUATION_CANDIDATE_FOR_TESTING);
+ PagedSpace* space = static_cast<PagedSpace*>(page->owner());
+ Address top = space->top();
+ Address limit = space->limit();
+ if (top < limit && Page::FromAllocationAreaAddress(top) == page) {
+ // Create filler object to keep page iterable if it was iterable.
+ int remaining = static_cast<int>(limit - top);
+ space->heap()->CreateFillerObjectAt(top, remaining,
+ ClearRecordedSlots::kNo);
+ space->SetTopAndLimit(nullptr, nullptr);
+ }
+}
+
} // namespace heap
} // namespace internal
} // namespace v8
« 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