Commit f13cd25f authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[oilpan] Fix object start bitmap verification

Verification requires iterability of pages implying that we cannot have
a linear allocation area.

The area was however potentially set up during compaction.

Bug: chromium:757440
Change-Id: I9b12ecac032893aaa6d6f022149cec0a6130ebf9
Reviewed-on: https://chromium-review.googlesource.com/997672Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#548421}
parent edbaf095
......@@ -210,7 +210,7 @@ void BaseArena::MakeConsistentForMutator() {
}
DCHECK(SweepingCompleted());
Verify();
VerifyObjectStartBitmap();
}
size_t BaseArena::ObjectPayloadSizeForTesting() {
......@@ -232,7 +232,7 @@ void BaseArena::PrepareForSweep() {
ClearFreeLists();
// Verification depends on the allocation point being cleared.
Verify();
VerifyObjectStartBitmap();
for (BasePage* page = first_page_; page; page = page->Next()) {
page->MarkAsUnswept();
......@@ -584,11 +584,14 @@ void NormalPageArena::SweepAndCompact() {
heap.Compaction()->FinishedArenaCompaction(this, freed_page_count,
freed_size);
Verify();
VerifyObjectStartBitmap();
}
void NormalPageArena::Verify() {
void NormalPageArena::VerifyObjectStartBitmap() {
#if DCHECK_IS_ON()
// Verifying object start bitmap requires iterability of pages. As compaction
// may set up a new we have to reset here.
SetAllocationPoint(nullptr, 0);
for (NormalPage* page = static_cast<NormalPage*>(first_page_); page;
page = static_cast<NormalPage*>(page->Next()))
page->VerifyObjectStartBitmapIsConsistentWithPayload();
......
......@@ -774,7 +774,7 @@ class PLATFORM_EXPORT BaseArena {
bool WillObjectBeLazilySwept(BasePage*, void*) const;
virtual void Verify(){};
virtual void VerifyObjectStartBitmap(){};
virtual void VerifyMarking(){};
protected:
......@@ -836,7 +836,7 @@ class PLATFORM_EXPORT NormalPageArena final : public BaseArena {
void SweepAndCompact();
void Verify() override;
void VerifyObjectStartBitmap() override;
void VerifyMarking() override;
Address CurrentAllocationPoint() const { return current_allocation_point_; }
......
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