[heap] Remove heap-local variable caching FLAG_concurrent_sweeping
R=hpayer@chromium.org BUG= Review URL: https://codereview.chromium.org/1522433002 Cr-Commit-Position: refs/heads/master@{#32789}
This commit is contained in:
parent
3f648d7b44
commit
bd104277c2
@ -162,7 +162,6 @@ Heap::Heap()
|
|||||||
pending_unmapping_tasks_semaphore_(0),
|
pending_unmapping_tasks_semaphore_(0),
|
||||||
gc_callbacks_depth_(0),
|
gc_callbacks_depth_(0),
|
||||||
deserialization_complete_(false),
|
deserialization_complete_(false),
|
||||||
concurrent_sweeping_enabled_(false),
|
|
||||||
strong_roots_list_(NULL),
|
strong_roots_list_(NULL),
|
||||||
array_buffer_tracker_(NULL) {
|
array_buffer_tracker_(NULL) {
|
||||||
// Allow build-time customization of the max semispace size. Building
|
// Allow build-time customization of the max semispace size. Building
|
||||||
@ -5004,8 +5003,6 @@ bool Heap::SetUp() {
|
|||||||
if (!ConfigureHeapDefault()) return false;
|
if (!ConfigureHeapDefault()) return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
concurrent_sweeping_enabled_ = FLAG_concurrent_sweeping;
|
|
||||||
|
|
||||||
base::CallOnce(&initialize_gc_once, &InitializeGCOnce);
|
base::CallOnce(&initialize_gc_once, &InitializeGCOnce);
|
||||||
|
|
||||||
// Set up memory allocator.
|
// Set up memory allocator.
|
||||||
|
@ -959,8 +959,6 @@ class Heap {
|
|||||||
|
|
||||||
void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature);
|
void IncrementDeferredCount(v8::Isolate::UseCounterFeature feature);
|
||||||
|
|
||||||
bool concurrent_sweeping_enabled() { return concurrent_sweeping_enabled_; }
|
|
||||||
|
|
||||||
inline bool OldGenerationAllocationLimitReached();
|
inline bool OldGenerationAllocationLimitReached();
|
||||||
|
|
||||||
void QueueMemoryChunkForFree(MemoryChunk* chunk);
|
void QueueMemoryChunkForFree(MemoryChunk* chunk);
|
||||||
@ -2363,8 +2361,6 @@ class Heap {
|
|||||||
|
|
||||||
bool deserialization_complete_;
|
bool deserialization_complete_;
|
||||||
|
|
||||||
bool concurrent_sweeping_enabled_;
|
|
||||||
|
|
||||||
StrongRootsList* strong_roots_list_;
|
StrongRootsList* strong_roots_list_;
|
||||||
|
|
||||||
ArrayBufferTracker* array_buffer_tracker_;
|
ArrayBufferTracker* array_buffer_tracker_;
|
||||||
|
@ -1176,7 +1176,7 @@ intptr_t IncrementalMarking::Step(intptr_t allocated_bytes,
|
|||||||
if (state_ == SWEEPING) {
|
if (state_ == SWEEPING) {
|
||||||
if (heap_->mark_compact_collector()->sweeping_in_progress() &&
|
if (heap_->mark_compact_collector()->sweeping_in_progress() &&
|
||||||
(heap_->mark_compact_collector()->IsSweepingCompleted() ||
|
(heap_->mark_compact_collector()->IsSweepingCompleted() ||
|
||||||
!heap_->concurrent_sweeping_enabled())) {
|
!FLAG_concurrent_sweeping)) {
|
||||||
heap_->mark_compact_collector()->EnsureSweepingCompleted();
|
heap_->mark_compact_collector()->EnsureSweepingCompleted();
|
||||||
}
|
}
|
||||||
if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
|
if (!heap_->mark_compact_collector()->sweeping_in_progress()) {
|
||||||
|
@ -561,7 +561,7 @@ void MarkCompactCollector::SweepOrWaitUntilSweepingCompleted(Page* page) {
|
|||||||
|
|
||||||
|
|
||||||
void MarkCompactCollector::SweepAndRefill(CompactionSpace* space) {
|
void MarkCompactCollector::SweepAndRefill(CompactionSpace* space) {
|
||||||
if (heap()->concurrent_sweeping_enabled() && !IsSweepingCompleted()) {
|
if (FLAG_concurrent_sweeping && !IsSweepingCompleted()) {
|
||||||
SweepInParallel(heap()->paged_space(space->identity()), 0);
|
SweepInParallel(heap()->paged_space(space->identity()), 0);
|
||||||
space->RefillFreeList();
|
space->RefillFreeList();
|
||||||
}
|
}
|
||||||
@ -573,13 +573,13 @@ void MarkCompactCollector::EnsureSweepingCompleted() {
|
|||||||
|
|
||||||
// If sweeping is not completed or not running at all, we try to complete it
|
// If sweeping is not completed or not running at all, we try to complete it
|
||||||
// here.
|
// here.
|
||||||
if (!heap()->concurrent_sweeping_enabled() || !IsSweepingCompleted()) {
|
if (!FLAG_concurrent_sweeping || !IsSweepingCompleted()) {
|
||||||
SweepInParallel(heap()->paged_space(OLD_SPACE), 0);
|
SweepInParallel(heap()->paged_space(OLD_SPACE), 0);
|
||||||
SweepInParallel(heap()->paged_space(CODE_SPACE), 0);
|
SweepInParallel(heap()->paged_space(CODE_SPACE), 0);
|
||||||
SweepInParallel(heap()->paged_space(MAP_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();
|
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);
|
SweepSpace(heap()->map_space(), CONCURRENT_SWEEPING);
|
||||||
}
|
}
|
||||||
sweeping_in_progress_ = true;
|
sweeping_in_progress_ = true;
|
||||||
if (heap()->concurrent_sweeping_enabled()) {
|
if (FLAG_concurrent_sweeping) {
|
||||||
StartSweeperThreads();
|
StartSweeperThreads();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user