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

Unified Diff: src/heap/spaces.h

Issue 2063013005: Revert of [heap] Add page evacuation mode for new->new (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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 | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/spaces.h
diff --git a/src/heap/spaces.h b/src/heap/spaces.h
index 37d43b17c4c72f8ff482f6192466f6f4d16d8672..0981c3650efe8d9b6fa6b55ac4e8b06de811e6b5 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -425,10 +425,6 @@
// from new to old space during evacuation.
PAGE_NEW_OLD_PROMOTION,
- // |PAGE_NEW_NEW_PROMOTION|: A page tagged with this flag has been moved
- // within the new space during evacuation.
- PAGE_NEW_NEW_PROMOTION,
-
// A black page has all mark bits set to 1 (black). A black page currently
// cannot be iterated because it is not swept. Moreover live bytes are also
// not updated.
@@ -2435,8 +2431,6 @@
// than the current capacity.
bool ShrinkTo(int new_capacity);
- bool EnsureCurrentCapacity();
-
// Returns the start address of the first page of the space.
Address space_start() {
DCHECK_NE(anchor_.next_page(), anchor());
@@ -2465,8 +2459,7 @@
// Resets the space to using the first page.
void Reset();
- void RemovePage(Page* page);
- void PrependPage(Page* page);
+ bool ReplaceWithEmptyPage(Page* page);
// Age mark accessors.
Address age_mark() { return age_mark_; }
@@ -2542,9 +2535,8 @@
Page anchor_;
Page* current_page_;
- friend class NewSpace;
+ friend class SemiSpaceIterator;
friend class NewSpacePageIterator;
- friend class SemiSpaceIterator;
};
@@ -2723,14 +2715,11 @@
return static_cast<size_t>(allocated);
}
- void MovePageFromSpaceToSpace(Page* page) {
+ bool ReplaceWithEmptyPage(Page* page) {
+ // This method is called after flipping the semispace.
DCHECK(page->InFromSpace());
- from_space_.RemovePage(page);
- to_space_.PrependPage(page);
- pages_used_++;
- }
-
- bool Rebalance();
+ return from_space_.ReplaceWithEmptyPage(page);
+ }
// Return the maximum capacity of a semispace.
int MaximumCapacity() {
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698