Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(422)

Unified Diff: test/cctest/test-spaces.cc

Issue 2071020: Reverting r4685, r4686, r4687 (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-spaces.cc
===================================================================
--- test/cctest/test-spaces.cc (revision 4686)
+++ 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);
}
« no previous file with comments | « test/cctest/test-log-stack-tracer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698