Commit 9ed38aab authored by mlippautz's avatar mlippautz Committed by Commit bot

[heap] Virtualize evacuaton verification in MC

In preparation for adding another verifier that only considers a subset
of the graph.

BUG=chromium:651354

Review-Url: https://codereview.chromium.org/2844473002
Cr-Commit-Position: refs/heads/master@{#44867}
parent e665ceba
...@@ -230,14 +230,7 @@ class EvacuationVerifier : public ObjectVisitor, public RootVisitor { ...@@ -230,14 +230,7 @@ class EvacuationVerifier : public ObjectVisitor, public RootVisitor {
protected: protected:
explicit EvacuationVerifier(Heap* heap) : heap_(heap) {} explicit EvacuationVerifier(Heap* heap) : heap_(heap) {}
void VerifyPointers(Object** start, Object** end) { virtual void VerifyPointers(Object** start, Object** end) = 0;
for (Object** current = start; current < end; current++) {
if ((*current)->IsHeapObject()) {
HeapObject* object = HeapObject::cast(*current);
CHECK(!MarkCompactCollector::IsOnEvacuationCandidate(object));
}
}
}
void VerifyRoots(VisitMode mode); void VerifyRoots(VisitMode mode);
void VerifyEvacuationOnPage(Address start, Address end); void VerifyEvacuationOnPage(Address start, Address end);
...@@ -294,6 +287,16 @@ class FullEvacuationVerifier : public EvacuationVerifier { ...@@ -294,6 +287,16 @@ class FullEvacuationVerifier : public EvacuationVerifier {
VerifyEvacuation(heap_->code_space()); VerifyEvacuation(heap_->code_space());
VerifyEvacuation(heap_->map_space()); VerifyEvacuation(heap_->map_space());
} }
protected:
void VerifyPointers(Object** start, Object** end) override {
for (Object** current = start; current < end; current++) {
if ((*current)->IsHeapObject()) {
HeapObject* object = HeapObject::cast(*current);
CHECK(!MarkCompactCollector::IsOnEvacuationCandidate(object));
}
}
}
}; };
} // namespace } // namespace
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment