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

Side by Side Diff: src/mark-compact.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/heap.cc ('k') | src/spaces.h » ('j') | 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 // 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 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 } 319 }
320 } 320 }
321 321
322 Context* current_native_context_; 322 Context* current_native_context_;
323 }; 323 };
324 324
325 325
326 static void VerifyNativeContextSeparation(Heap* heap) { 326 static void VerifyNativeContextSeparation(Heap* heap) {
327 HeapObjectIterator it(heap->code_space()); 327 HeapObjectIterator it(heap->code_space());
328 328
329 for (Object* object = it.Next(); object != NULL; object = it.Next()) { 329 for (Object* object = it.NextIgnoreEvacuationCandidates();
330 object != NULL;
331 object = it.NextIgnoreEvacuationCandidates()) {
330 VerifyNativeContextSeparationVisitor visitor; 332 VerifyNativeContextSeparationVisitor visitor;
331 Code::cast(object)->CodeIterateBody(&visitor); 333 Code::cast(object)->CodeIterateBody(&visitor);
332 } 334 }
333 } 335 }
334 #endif 336 #endif
335 337
336 338
337 void MarkCompactCollector::AddEvacuationCandidate(Page* p) { 339 void MarkCompactCollector::AddEvacuationCandidate(Page* p) {
338 p->MarkEvacuationCandidate(); 340 p->MarkEvacuationCandidate();
339 evacuation_candidates_.Add(p); 341 evacuation_candidates_.Add(p);
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) { 477 for (HeapObject* obj = it.Next(); obj != NULL; obj = it.Next()) {
476 MarkBit mark_bit = Marking::MarkBitFrom(obj); 478 MarkBit mark_bit = Marking::MarkBitFrom(obj);
477 CHECK(Marking::IsWhite(mark_bit)); 479 CHECK(Marking::IsWhite(mark_bit));
478 CHECK_EQ(0, Page::FromAddress(obj->address())->LiveBytes()); 480 CHECK_EQ(0, Page::FromAddress(obj->address())->LiveBytes());
479 } 481 }
480 } 482 }
481 483
482 484
483 void MarkCompactCollector::VerifyWeakEmbeddedMapsInOptimizedCode() { 485 void MarkCompactCollector::VerifyWeakEmbeddedMapsInOptimizedCode() {
484 HeapObjectIterator code_iterator(heap()->code_space()); 486 HeapObjectIterator code_iterator(heap()->code_space());
485 for (HeapObject* obj = code_iterator.Next(); 487 for (HeapObject* obj = code_iterator.NextIgnoreEvacuationCandidates();
486 obj != NULL; 488 obj != NULL;
487 obj = code_iterator.Next()) { 489 obj = code_iterator.NextIgnoreEvacuationCandidates()) {
488 Code* code = Code::cast(obj); 490 Code* code = Code::cast(obj);
489 if (code->kind() != Code::OPTIMIZED_FUNCTION) continue; 491 if (code->kind() != Code::OPTIMIZED_FUNCTION) continue;
490 if (code->marked_for_deoptimization()) continue; 492 if (code->marked_for_deoptimization()) continue;
491 code->VerifyEmbeddedMapsDependency(); 493 code->VerifyEmbeddedMapsDependency();
492 } 494 }
493 } 495 }
494 496
495 497
496 void MarkCompactCollector::VerifyOmittedPrototypeChecks() { 498 void MarkCompactCollector::VerifyOmittedPrototypeChecks() {
497 HeapObjectIterator iterator(heap()->map_space()); 499 HeapObjectIterator iterator(heap()->map_space());
498 for (HeapObject* obj = iterator.Next(); 500 for (HeapObject* obj = iterator.NextIgnoreEvacuationCandidates();
499 obj != NULL; 501 obj != NULL;
500 obj = iterator.Next()) { 502 obj = iterator.NextIgnoreEvacuationCandidates()) {
501 Map* map = Map::cast(obj); 503 Map* map = Map::cast(obj);
502 map->VerifyOmittedPrototypeChecks(); 504 map->VerifyOmittedPrototypeChecks();
503 } 505 }
504 } 506 }
505 #endif // VERIFY_HEAP 507 #endif // VERIFY_HEAP
506 508
507 509
508 static void ClearMarkbitsInPagedSpace(PagedSpace* space) { 510 static void ClearMarkbitsInPagedSpace(PagedSpace* space) {
509 PageIterator it(space); 511 PageIterator it(space);
510 512
(...skipping 3609 matching lines...) Expand 10 before | Expand all | Expand 10 after
4120 while (buffer != NULL) { 4122 while (buffer != NULL) {
4121 SlotsBuffer* next_buffer = buffer->next(); 4123 SlotsBuffer* next_buffer = buffer->next();
4122 DeallocateBuffer(buffer); 4124 DeallocateBuffer(buffer);
4123 buffer = next_buffer; 4125 buffer = next_buffer;
4124 } 4126 }
4125 *buffer_address = NULL; 4127 *buffer_address = NULL;
4126 } 4128 }
4127 4129
4128 4130
4129 } } // namespace v8::internal 4131 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/spaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698