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

Unified Diff: test/cctest/heap/utils-inl.h

Issue 1896883003: Revert of 🏄 [heap] Add page evacuation mode for new->old (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/heap/utils-inl.h
diff --git a/test/cctest/heap/utils-inl.h b/test/cctest/heap/utils-inl.h
index 0e943b4197538bccb7bd79c14c0bcd352a512177..56033c151ed614cb9bfdac41ee79b808687083a8 100644
--- a/test/cctest/heap/utils-inl.h
+++ b/test/cctest/heap/utils-inl.h
@@ -63,48 +63,37 @@
// Helper function that simulates a full new-space in the heap.
-static inline bool FillUpOnePage(
- v8::internal::NewSpace* space,
- std::vector<Handle<FixedArray>>* out_handles = nullptr) {
+static inline bool FillUpOnePage(v8::internal::NewSpace* space) {
space->DisableInlineAllocationSteps();
int space_remaining = static_cast<int>(*space->allocation_limit_address() -
*space->allocation_top_address());
if (space_remaining == 0) return false;
- std::vector<Handle<FixedArray>> handles =
- CreatePadding(space->heap(), space_remaining, i::NOT_TENURED);
- if (out_handles != nullptr)
- out_handles->insert(out_handles->end(), handles.begin(), handles.end());
+ CreatePadding(space->heap(), space_remaining, i::NOT_TENURED);
return true;
}
// Helper function that simulates a fill new-space in the heap.
-static inline void AllocateAllButNBytes(
- v8::internal::NewSpace* space, int extra_bytes,
- std::vector<Handle<FixedArray>>* out_handles = nullptr) {
+static inline void AllocateAllButNBytes(v8::internal::NewSpace* space,
+ int extra_bytes) {
space->DisableInlineAllocationSteps();
int space_remaining = static_cast<int>(*space->allocation_limit_address() -
*space->allocation_top_address());
CHECK(space_remaining >= extra_bytes);
int new_linear_size = space_remaining - extra_bytes;
if (new_linear_size == 0) return;
- std::vector<Handle<FixedArray>> handles =
- CreatePadding(space->heap(), new_linear_size, i::NOT_TENURED);
- if (out_handles != nullptr)
- out_handles->insert(out_handles->end(), handles.begin(), handles.end());
+ CreatePadding(space->heap(), new_linear_size, i::NOT_TENURED);
}
-static inline void FillCurrentPage(
- v8::internal::NewSpace* space,
- std::vector<Handle<FixedArray>>* out_handles = nullptr) {
- AllocateAllButNBytes(space, 0, out_handles);
+
+static inline void FillCurrentPage(v8::internal::NewSpace* space) {
+ AllocateAllButNBytes(space, 0);
}
-static inline void SimulateFullSpace(
- v8::internal::NewSpace* space,
- std::vector<Handle<FixedArray>>* out_handles = nullptr) {
- FillCurrentPage(space, out_handles);
- while (FillUpOnePage(space, out_handles) || space->AddFreshPage()) {
+
+static inline void SimulateFullSpace(v8::internal::NewSpace* space) {
+ FillCurrentPage(space);
+ while (FillUpOnePage(space)) {
}
}
« no previous file with comments | « test/cctest/heap/test-heap.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698