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

Unified Diff: src/heap/mark-compact.cc

Issue 1301183002: [heap] Cleanup and fix GC flags / add testing infra (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed Hannes' comments Created 5 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.h ('k') | src/heap/mark-compact-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index 49bf1040b0bbc8270470717cb2ed9878042a6e07..18570f748181d83849f407aed1a488a2a63c8429 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -42,9 +42,6 @@ MarkCompactCollector::MarkCompactCollector(Heap* heap)
#ifdef DEBUG
state_(IDLE),
#endif
- reduce_memory_footprint_(false),
- abort_incremental_marking_(false),
- finalize_incremental_marking_(false),
marking_parity_(ODD_MARKING_PARITY),
compacting_(false),
was_marked_incrementally_(false),
@@ -666,7 +663,7 @@ void MarkCompactCollector::CollectEvacuationCandidates(PagedSpace* space) {
int total_live_bytes = 0;
bool reduce_memory =
- reduce_memory_footprint_ || heap()->HasLowAllocationRate();
+ heap()->ShouldReduceMemory() || heap()->HasLowAllocationRate();
if (FLAG_manual_evacuation_candidates_selection) {
for (size_t i = 0; i < pages.size(); i++) {
Page* p = pages[i].second;
@@ -788,7 +785,7 @@ void MarkCompactCollector::Prepare() {
}
// Clear marking bits if incremental marking is aborted.
- if (was_marked_incrementally_ && abort_incremental_marking_) {
+ if (was_marked_incrementally_ && heap_->ShouldAbortIncrementalMarking()) {
heap()->incremental_marking()->Stop();
ClearMarkbits();
AbortWeakCollections();
@@ -2060,7 +2057,7 @@ void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) {
void MarkCompactCollector::RetainMaps() {
- if (reduce_memory_footprint_ || abort_incremental_marking_ ||
+ if (heap()->ShouldReduceMemory() || heap()->ShouldAbortIncrementalMarking() ||
FLAG_retain_maps_for_n_gc == 0) {
// Do not retain dead maps if flag disables it or there is
// - memory pressure (reduce_memory_footprint_),
« no previous file with comments | « src/heap/mark-compact.h ('k') | src/heap/mark-compact-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698