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

Side by Side Diff: src/spaces.cc

Issue 12529005: Ignore evacuation canditate pages when verifying spaces. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/spaces.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 cur_addr_ = cur; 93 cur_addr_ = cur;
94 cur_end_ = end; 94 cur_end_ = end;
95 page_mode_ = mode; 95 page_mode_ = mode;
96 size_func_ = size_f; 96 size_func_ = size_f;
97 } 97 }
98 98
99 99
100 // We have hit the end of the page and should advance to the next block of 100 // We have hit the end of the page and should advance to the next block of
101 // objects. This happens at the end of the page. 101 // objects. This happens at the end of the page.
102 bool HeapObjectIterator::AdvanceToNextPage() { 102 bool HeapObjectIterator::AdvanceToNextPage() {
103 ASSERT(cur_addr_ == cur_end_);
104 if (page_mode_ == kOnePageOnly) return false; 103 if (page_mode_ == kOnePageOnly) return false;
105 Page* cur_page; 104 Page* cur_page;
106 if (cur_addr_ == NULL) { 105 if (cur_addr_ == NULL) {
107 cur_page = space_->anchor(); 106 cur_page = space_->anchor();
108 } else { 107 } else {
109 cur_page = Page::FromAddress(cur_addr_ - 1); 108 cur_page = Page::FromAddress(cur_addr_ - 1);
110 ASSERT(cur_addr_ == cur_page->area_end());
111 } 109 }
112 cur_page = cur_page->next_page(); 110 cur_page = cur_page->next_page();
113 if (cur_page == space_->anchor()) return false; 111 if (cur_page == space_->anchor()) return false;
114 cur_addr_ = cur_page->area_start(); 112 cur_addr_ = cur_page->area_start();
115 cur_end_ = cur_page->area_end(); 113 cur_end_ = cur_page->area_end();
116 ASSERT(cur_page->WasSweptPrecisely()); 114 ASSERT(cur_page->WasSweptPrecisely());
117 return true; 115 return true;
118 } 116 }
119 117
120 118
(...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after
1097 Page* page = page_iterator.next(); 1095 Page* page = page_iterator.next();
1098 CHECK(page->owner() == this); 1096 CHECK(page->owner() == this);
1099 if (page == Page::FromAllocationTop(allocation_info_.top)) { 1097 if (page == Page::FromAllocationTop(allocation_info_.top)) {
1100 allocation_pointer_found_in_space = true; 1098 allocation_pointer_found_in_space = true;
1101 } 1099 }
1102 CHECK(page->WasSweptPrecisely()); 1100 CHECK(page->WasSweptPrecisely());
1103 HeapObjectIterator it(page, NULL); 1101 HeapObjectIterator it(page, NULL);
1104 Address end_of_previous_object = page->area_start(); 1102 Address end_of_previous_object = page->area_start();
1105 Address top = page->area_end(); 1103 Address top = page->area_end();
1106 int black_size = 0; 1104 int black_size = 0;
1107 for (HeapObject* object = it.Next(); object != NULL; object = it.Next()) { 1105 for (HeapObject* object = it.NextIgnoreEvacuationCandidates();
1106 object != NULL;
1107 object = it.NextIgnoreEvacuationCandidates()) {
1108 CHECK(end_of_previous_object <= object->address()); 1108 CHECK(end_of_previous_object <= object->address());
1109 1109
1110 // The first word should be a map, and we expect all map pointers to 1110 // The first word should be a map, and we expect all map pointers to
1111 // be in map space. 1111 // be in map space.
1112 Map* map = object->map(); 1112 Map* map = object->map();
1113 CHECK(map->IsMap()); 1113 CHECK(map->IsMap());
1114 CHECK(heap()->map_space()->Contains(map)); 1114 CHECK(heap()->map_space()->Contains(map));
1115 1115
1116 // Perform space-specific object verification. 1116 // Perform space-specific object verification.
1117 VerifyObject(object); 1117 VerifyObject(object);
(...skipping 2012 matching lines...) Expand 10 before | Expand all | Expand 10 after
3130 object->ShortPrint(); 3130 object->ShortPrint();
3131 PrintF("\n"); 3131 PrintF("\n");
3132 } 3132 }
3133 printf(" --------------------------------------\n"); 3133 printf(" --------------------------------------\n");
3134 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); 3134 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes());
3135 } 3135 }
3136 3136
3137 #endif // DEBUG 3137 #endif // DEBUG
3138 3138
3139 } } // namespace v8::internal 3139 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698