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

Side by Side Diff: src/heap/mark-compact.cc

Issue 2244233007: Revert of [heap] Don't unmap new space pages while sweeping is active (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/heap/mark-compact.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 ForAllSweepingSpaces([this](AllocationSpace space) { 535 ForAllSweepingSpaces([this](AllocationSpace space) {
536 if (space == NEW_SPACE) { 536 if (space == NEW_SPACE) {
537 swept_list_[NEW_SPACE].Clear(); 537 swept_list_[NEW_SPACE].Clear();
538 } 538 }
539 DCHECK(sweeping_list_[space].empty()); 539 DCHECK(sweeping_list_[space].empty());
540 }); 540 });
541 late_pages_ = false; 541 late_pages_ = false;
542 sweeping_in_progress_ = false; 542 sweeping_in_progress_ = false;
543 } 543 }
544 544
545 void MarkCompactCollector::Sweeper::EnsureNewSpaceCompleted() {
546 if (!sweeping_in_progress_) return;
547 if (!FLAG_concurrent_sweeping || !IsSweepingCompleted()) {
548 for (Page* p : *heap_->new_space()) {
549 SweepOrWaitUntilSweepingCompleted(p);
550 }
551 }
552 }
553
545 void MarkCompactCollector::EnsureSweepingCompleted() { 554 void MarkCompactCollector::EnsureSweepingCompleted() {
546 if (!sweeper().sweeping_in_progress()) return; 555 if (!sweeper().sweeping_in_progress()) return;
547 556
548 sweeper().EnsureCompleted(); 557 sweeper().EnsureCompleted();
549 heap()->old_space()->RefillFreeList(); 558 heap()->old_space()->RefillFreeList();
550 heap()->code_space()->RefillFreeList(); 559 heap()->code_space()->RefillFreeList();
551 heap()->map_space()->RefillFreeList(); 560 heap()->map_space()->RefillFreeList();
552 561
553 #ifdef VERIFY_HEAP 562 #ifdef VERIFY_HEAP
554 if (FLAG_verify_heap && !evacuation()) { 563 if (FLAG_verify_heap && !evacuation()) {
(...skipping 3473 matching lines...) Expand 10 before | Expand all | Expand 10 after
4028 // The target is always in old space, we don't have to record the slot in 4037 // The target is always in old space, we don't have to record the slot in
4029 // the old-to-new remembered set. 4038 // the old-to-new remembered set.
4030 DCHECK(!heap()->InNewSpace(target)); 4039 DCHECK(!heap()->InNewSpace(target));
4031 RecordRelocSlot(host, &rinfo, target); 4040 RecordRelocSlot(host, &rinfo, target);
4032 } 4041 }
4033 } 4042 }
4034 } 4043 }
4035 4044
4036 } // namespace internal 4045 } // namespace internal
4037 } // namespace v8 4046 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/mark-compact.h ('k') | src/heap/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698