Commit 724095aa authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Remove VerifyAllObjectsBlack from VisitLiveObjects

Markbits should be verified in VerifyMarking and friends. The function
may also be used then e.g. iterating just black objects while
incremental marking is active for the fast promotion mode.

BUG=chromium:694255

Change-Id: Ia719a983fec27b2bae03f8c6c3332003a10e8823
Reviewed-on: https://chromium-review.googlesource.com/451363Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Reviewed-by: 's avatarHannes Payer <hpayer@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43669}
parent dee757f4
......@@ -3453,17 +3453,6 @@ bool MarkCompactCollector::WillBeDeoptimized(Code* code) {
return code->is_optimized_code() && code->marked_for_deoptimization();
}
#ifdef VERIFY_HEAP
static void VerifyAllBlackObjects(MemoryChunk* page) {
LiveObjectIterator<kAllLiveObjects> it(page);
HeapObject* object = NULL;
while ((object = it.Next()) != NULL) {
CHECK(ObjectMarking::IsBlack(object));
}
}
#endif // VERIFY_HEAP
void MarkCompactCollector::RecordLiveSlotsOnPage(Page* page) {
EvacuateRecordOnlyVisitor visitor(heap());
VisitLiveObjects(page, &visitor, kKeepMarking);
......@@ -3472,10 +3461,6 @@ void MarkCompactCollector::RecordLiveSlotsOnPage(Page* page) {
template <class Visitor>
bool MarkCompactCollector::VisitLiveObjects(MemoryChunk* page, Visitor* visitor,
IterationMode mode) {
#ifdef VERIFY_HEAP
VerifyAllBlackObjects(page);
#endif // VERIFY_HEAP
LiveObjectIterator<kBlackObjects> it(page);
HeapObject* object = nullptr;
while ((object = it.Next()) != nullptr) {
......
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