diff --git a/src/heap/heap.cc b/src/heap/heap.cc index c6ebc0dcce..aa65e8d78a 100644 --- a/src/heap/heap.cc +++ b/src/heap/heap.cc @@ -162,7 +162,6 @@ Heap::Heap() pending_unmapping_tasks_semaphore_(0), gc_callbacks_depth_(0), deserialization_complete_(false), - concurrent_sweeping_enabled_(false), strong_roots_list_(NULL), array_buffer_tracker_(NULL) { // Allow build-time customization of the max semispace size. Building @@ -5004,8 +5003,6 @@ bool Heap::SetUp() { if (!ConfigureHeapDefault()) return false; } - concurrent_sweeping_enabled_ = FLAG_concurrent_sweeping; - base::CallOnce(&initialize_gc_once, &InitializeGCOnce); // Set up memory allocator. diff --git a/src/heap/heap.h b/src/heap/heap.h index 28d7e2a5a4..8eeb04f0cd 100644 --- a/src/heap/heap.h +++ b/src/heap/heap.h @@ -959,8 +959,6 @@ class Heap { void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature); - bool concurrent_sweeping_enabled() { return concurrent_sweeping_enabled_; } - inline bool OldGenerationAllocationLimitReached(); void QueueMemoryChunkForFree(MemoryChunk* chunk); @@ -2363,8 +2361,6 @@ class Heap { bool deserialization_complete_; - bool concurrent_sweeping_enabled_; - StrongRootsList* strong_roots_list_; ArrayBufferTracker* array_buffer_tracker_; diff --git a/src/heap/incremental-marking.cc b/src/heap/incremental-marking.cc index 9df46693f7..838f9d0b6b 100644 --- a/src/heap/incremental-marking.cc +++ b/src/heap/incremental-marking.cc @@ -1176,7 +1176,7 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes, if (state_ == SWEEPING) { if (heap_->mark_compact_collector()->sweeping_in_progress() && (heap_->mark_compact_collector()->IsSweepingCompleted() || - !heap_->concurrent_sweeping_enabled())) { + !FLAG_concurrent_sweeping)) { heap_->mark_compact_collector()->EnsureSweepingCompleted(); } if (!heap_->mark_compact_collector()->sweeping_in_progress()) { diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc index fcc99c3b6b..6750d02c0d 100644 --- a/src/heap/mark-compact.cc +++ b/src/heap/mark-compact.cc @@ -561,7 +561,7 @@ void MarkCompactCollector::SweepOrWaitUntilSweepingCompleted(Page* page) { void MarkCompactCollector::SweepAndRefill(CompactionSpace* space) { - if (heap()->concurrent_sweeping_enabled() && !IsSweepingCompleted()) { + if (FLAG_concurrent_sweeping && !IsSweepingCompleted()) { SweepInParallel(heap()->paged_space(space->identity()), 0); space->RefillFreeList(); } @@ -573,13 +573,13 @@ void MarkCompactCollector::EnsureSweepingCompleted() { // If sweeping is not completed or not running at all, we try to complete it // here. - if (!heap()->concurrent_sweeping_enabled() || !IsSweepingCompleted()) { + if (!FLAG_concurrent_sweeping || !IsSweepingCompleted()) { SweepInParallel(heap()->paged_space(OLD_SPACE), 0); SweepInParallel(heap()->paged_space(CODE_SPACE), 0); SweepInParallel(heap()->paged_space(MAP_SPACE), 0); } - if (heap()->concurrent_sweeping_enabled()) { + if (FLAG_concurrent_sweeping) { pending_sweeper_tasks_semaphore_.Wait(); pending_sweeper_tasks_semaphore_.Wait(); pending_sweeper_tasks_semaphore_.Wait(); @@ -3848,7 +3848,7 @@ void MarkCompactCollector::SweepSpaces() { SweepSpace(heap()->map_space(), CONCURRENT_SWEEPING); } sweeping_in_progress_ = true; - if (heap()->concurrent_sweeping_enabled()) { + if (FLAG_concurrent_sweeping) { StartSweeperThreads(); } }