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

Side by Side Diff: src/heap/mark-compact.cc

Issue 2798843004: [heap] Enable verification of evacuation for old space (Closed)
Patch Set: Created 3 years, 8 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
« no previous file with comments | « no previous file | 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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/heap/mark-compact.h" 5 #include "src/heap/mark-compact.h"
6 6
7 #include "src/base/atomicops.h" 7 #include "src/base/atomicops.h"
8 #include "src/base/bits.h" 8 #include "src/base/bits.h"
9 #include "src/base/sys-info.h" 9 #include "src/base/sys-info.h"
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 for (auto it = range.begin(); it != range.end();) { 247 for (auto it = range.begin(); it != range.end();) {
248 Page* page = *(it++); 248 Page* page = *(it++);
249 Address current = page->area_start(); 249 Address current = page->area_start();
250 Address limit = it != range.end() ? page->area_end() : space->top(); 250 Address limit = it != range.end() ? page->area_end() : space->top();
251 CHECK(limit == space->top() || !page->Contains(space->top())); 251 CHECK(limit == space->top() || !page->Contains(space->top()));
252 VerifyEvacuationOnPage(current, limit); 252 VerifyEvacuationOnPage(current, limit);
253 } 253 }
254 } 254 }
255 255
256 void EvacuationVerifier::VerifyEvacuation(PagedSpace* space) { 256 void EvacuationVerifier::VerifyEvacuation(PagedSpace* space) {
257 if (FLAG_use_allocation_folding && (space == heap_->old_space())) {
258 return;
259 }
260 for (Page* p : *space) { 257 for (Page* p : *space) {
261 if (p->IsEvacuationCandidate()) continue; 258 if (p->IsEvacuationCandidate()) continue;
262 if (p->Contains(space->top())) 259 if (p->Contains(space->top()))
263 heap_->CreateFillerObjectAt(space->top(), space->limit() - space->top(), 260 heap_->CreateFillerObjectAt(space->top(), space->limit() - space->top(),
264 ClearRecordedSlots::kNo); 261 ClearRecordedSlots::kNo);
265 262
266 VerifyEvacuationOnPage(p->area_start(), p->area_end()); 263 VerifyEvacuationOnPage(p->area_start(), p->area_end());
267 } 264 }
268 } 265 }
269 266
(...skipping 3902 matching lines...) Expand 10 before | Expand all | Expand 10 after
4172 // The target is always in old space, we don't have to record the slot in 4169 // The target is always in old space, we don't have to record the slot in
4173 // the old-to-new remembered set. 4170 // the old-to-new remembered set.
4174 DCHECK(!heap()->InNewSpace(target)); 4171 DCHECK(!heap()->InNewSpace(target));
4175 RecordRelocSlot(host, &rinfo, target); 4172 RecordRelocSlot(host, &rinfo, target);
4176 } 4173 }
4177 } 4174 }
4178 } 4175 }
4179 4176
4180 } // namespace internal 4177 } // namespace internal
4181 } // namespace v8 4178 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698