Don't verify evacuation when it is not completed.
BUG= Review URL: https://codereview.chromium.org/756553002 Cr-Commit-Position: refs/heads/master@{#25478}
This commit is contained in:
parent
a56900a975
commit
1d0d520e77
@ -47,7 +47,7 @@ MarkCompactCollector::MarkCompactCollector(Heap* heap)
|
||||
was_marked_incrementally_(false),
|
||||
sweeping_in_progress_(false),
|
||||
pending_sweeper_jobs_semaphore_(0),
|
||||
sequential_sweeping_(false),
|
||||
evacuation_(false),
|
||||
migration_slots_buffer_(NULL),
|
||||
heap_(heap),
|
||||
code_flusher_(NULL),
|
||||
@ -487,7 +487,7 @@ void MarkCompactCollector::EnsureSweepingCompleted() {
|
||||
heap()->paged_space(OLD_POINTER_SPACE)->ResetUnsweptFreeBytes();
|
||||
|
||||
#ifdef VERIFY_HEAP
|
||||
if (FLAG_verify_heap) {
|
||||
if (FLAG_verify_heap && !evacuation()) {
|
||||
VerifyEvacuation(heap_);
|
||||
}
|
||||
#endif
|
||||
@ -3393,6 +3393,7 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
|
||||
{
|
||||
GCTracer::Scope gc_scope(heap()->tracer(),
|
||||
GCTracer::Scope::MC_EVACUATE_PAGES);
|
||||
EvacuationScope evacuation_scope(this);
|
||||
EvacuatePages();
|
||||
}
|
||||
|
||||
@ -4139,7 +4140,6 @@ void MarkCompactCollector::SweepSpaces() {
|
||||
GCTracer::Scope sweep_scope(heap()->tracer(),
|
||||
GCTracer::Scope::MC_SWEEP_OLDSPACE);
|
||||
{
|
||||
SequentialSweepingScope scope(this);
|
||||
SweepSpace(heap()->old_pointer_space(), CONCURRENT_SWEEPING);
|
||||
SweepSpace(heap()->old_data_space(), CONCURRENT_SWEEPING);
|
||||
}
|
||||
|
@ -643,11 +643,9 @@ class MarkCompactCollector {
|
||||
// Checks if sweeping is in progress right now on any space.
|
||||
bool sweeping_in_progress() { return sweeping_in_progress_; }
|
||||
|
||||
void set_sequential_sweeping(bool sequential_sweeping) {
|
||||
sequential_sweeping_ = sequential_sweeping;
|
||||
}
|
||||
void set_evacuation(bool evacuation) { evacuation_ = evacuation; }
|
||||
|
||||
bool sequential_sweeping() const { return sequential_sweeping_; }
|
||||
bool evacuation() const { return evacuation_; }
|
||||
|
||||
// Mark the global table which maps weak objects to dependent code without
|
||||
// marking its contents.
|
||||
@ -704,7 +702,7 @@ class MarkCompactCollector {
|
||||
|
||||
base::Semaphore pending_sweeper_jobs_semaphore_;
|
||||
|
||||
bool sequential_sweeping_;
|
||||
bool evacuation_;
|
||||
|
||||
SlotsBufferAllocator slots_buffer_allocator_;
|
||||
|
||||
@ -934,14 +932,14 @@ class MarkBitCellIterator BASE_EMBEDDED {
|
||||
};
|
||||
|
||||
|
||||
class SequentialSweepingScope BASE_EMBEDDED {
|
||||
class EvacuationScope BASE_EMBEDDED {
|
||||
public:
|
||||
explicit SequentialSweepingScope(MarkCompactCollector* collector)
|
||||
explicit EvacuationScope(MarkCompactCollector* collector)
|
||||
: collector_(collector) {
|
||||
collector_->set_sequential_sweeping(true);
|
||||
collector_->set_evacuation(true);
|
||||
}
|
||||
|
||||
~SequentialSweepingScope() { collector_->set_sequential_sweeping(false); }
|
||||
~EvacuationScope() { collector_->set_evacuation(false); }
|
||||
|
||||
private:
|
||||
MarkCompactCollector* collector_;
|
||||
|
Loading…
Reference in New Issue
Block a user