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

Unified Diff: src/heap/spaces.h

Issue 479113004: Remove conservative sweeping. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 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-inl.h ('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 312d75f52ee32e4cf6d22ea1e19fcf6f8882782b..16261b3670d40311cd8feae8b75f0e7d3a7b7c40 100644
--- a/src/heap/spaces.h
+++ b/src/heap/spaces.h
@@ -373,12 +373,9 @@ class MemoryChunk {
EVACUATION_CANDIDATE,
RESCAN_ON_EVACUATION,
- // Pages swept precisely can be iterated, hitting only the live objects.
- // Whereas those swept conservatively cannot be iterated over. Both flags
- // indicate that marking bits have been cleared by the sweeper, otherwise
- // marking bits are still intact.
- WAS_SWEPT_PRECISELY,
- WAS_SWEPT_CONSERVATIVELY,
+ // WAS_SWEPT indicates that marking bits have been cleared by the sweeper,
+ // otherwise marking bits are still intact.
+ WAS_SWEPT,
// Large objects can have a progress bar in their page header. These object
// are scanned in increments and will be kept black while being scanned.
@@ -765,15 +762,9 @@ class Page : public MemoryChunk {
void InitializeAsAnchor(PagedSpace* owner);
- bool WasSweptPrecisely() { return IsFlagSet(WAS_SWEPT_PRECISELY); }
- bool WasSweptConservatively() { return IsFlagSet(WAS_SWEPT_CONSERVATIVELY); }
- bool WasSwept() { return WasSweptPrecisely() || WasSweptConservatively(); }
-
- void MarkSweptPrecisely() { SetFlag(WAS_SWEPT_PRECISELY); }
- void MarkSweptConservatively() { SetFlag(WAS_SWEPT_CONSERVATIVELY); }
-
- void ClearSweptPrecisely() { ClearFlag(WAS_SWEPT_PRECISELY); }
- void ClearSweptConservatively() { ClearFlag(WAS_SWEPT_CONSERVATIVELY); }
+ bool WasSwept() { return IsFlagSet(WAS_SWEPT); }
+ void SetWasSwept() { SetFlag(WAS_SWEPT); }
+ void ClearWasSwept() { ClearFlag(WAS_SWEPT); }
void ResetFreeListStatistics();
@@ -1830,14 +1821,11 @@ class PagedSpace : public Space {
static void ResetCodeStatistics(Isolate* isolate);
#endif
- bool swept_precisely() { return swept_precisely_; }
- void set_swept_precisely(bool b) { swept_precisely_ = b; }
-
// Evacuation candidates are swept by evacuator. Needs to return a valid
// result before _and_ after evacuation has finished.
static bool ShouldBeSweptBySweeperThreads(Page* p) {
return !p->IsEvacuationCandidate() &&
- !p->IsFlagSet(Page::RESCAN_ON_EVACUATION) && !p->WasSweptPrecisely();
+ !p->IsFlagSet(Page::RESCAN_ON_EVACUATION) && !p->WasSwept();
}
void IncrementUnsweptFreeBytes(intptr_t by) { unswept_free_bytes_ += by; }
@@ -1907,12 +1895,8 @@ class PagedSpace : public Space {
// Normal allocation information.
AllocationInfo allocation_info_;
- // This space was swept precisely, hence it is iterable.
- bool swept_precisely_;
-
// The number of free bytes which could be reclaimed by advancing the
- // concurrent sweeper threads. This is only an estimation because concurrent
- // sweeping is done conservatively.
+ // concurrent sweeper threads.
intptr_t unswept_free_bytes_;
// The sweeper threads iterate over the list of pointer and data space pages
« no previous file with comments | « src/heap/mark-compact-inl.h ('k') | src/heap/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698