Index: test/cctest/test-spaces.cc |
=================================================================== |
--- test/cctest/test-spaces.cc (revision 4722) |
+++ test/cctest/test-spaces.cc (working copy) |
@@ -32,32 +32,40 @@ |
using namespace v8::internal; |
-static void VerifyRegionMarking(Address page_start) { |
+static void VerifyRSet(Address page_start) { |
+#ifdef DEBUG |
+ Page::set_rset_state(Page::IN_USE); |
+#endif |
+ |
Page* p = Page::FromAddress(page_start); |
- p->SetRegionMarks(Page::kAllRegionsCleanMarks); |
+ p->ClearRSet(); |
for (Address addr = p->ObjectAreaStart(); |
addr < p->ObjectAreaEnd(); |
addr += kPointerSize) { |
- CHECK(!Page::FromAddress(addr)->IsRegionDirty(addr)); |
+ CHECK(!Page::IsRSetSet(addr, 0)); |
} |
for (Address addr = p->ObjectAreaStart(); |
addr < p->ObjectAreaEnd(); |
addr += kPointerSize) { |
- Page::FromAddress(addr)->MarkRegionDirty(addr); |
+ Page::SetRSet(addr, 0); |
} |
for (Address addr = p->ObjectAreaStart(); |
addr < p->ObjectAreaEnd(); |
addr += kPointerSize) { |
- CHECK(Page::FromAddress(addr)->IsRegionDirty(addr)); |
+ CHECK(Page::IsRSetSet(addr, 0)); |
} |
} |
TEST(Page) { |
+#ifdef DEBUG |
+ Page::set_rset_state(Page::NOT_IN_USE); |
+#endif |
+ |
byte* mem = NewArray<byte>(2*Page::kPageSize); |
CHECK(mem != NULL); |
@@ -82,8 +90,8 @@ |
CHECK(p->OffsetToAddress(Page::kObjectStartOffset) == p->ObjectAreaStart()); |
CHECK(p->OffsetToAddress(Page::kPageSize) == p->ObjectAreaEnd()); |
- // test region marking |
- VerifyRegionMarking(page_start); |
+ // test remember set |
+ VerifyRSet(page_start); |
DeleteArray(mem); |
} |