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

Side by Side Diff: src/store-buffer.cc

Issue 377863003: Reland "Precisely sweep scan on scavenge pages and use heap iterator to iterate over them." (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 5 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.cc ('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 // 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/store-buffer.h" 5 #include "src/store-buffer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/v8.h" 9 #include "src/v8.h"
10 10
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 } 512 }
513 if (chunk->owner() == heap_->lo_space()) { 513 if (chunk->owner() == heap_->lo_space()) {
514 LargePage* large_page = reinterpret_cast<LargePage*>(chunk); 514 LargePage* large_page = reinterpret_cast<LargePage*>(chunk);
515 HeapObject* array = large_page->GetObject(); 515 HeapObject* array = large_page->GetObject();
516 ASSERT(array->IsFixedArray()); 516 ASSERT(array->IsFixedArray());
517 Address start = array->address(); 517 Address start = array->address();
518 Address end = start + array->Size(); 518 Address end = start + array->Size();
519 FindPointersToNewSpaceInRegion(start, end, slot_callback, clear_maps); 519 FindPointersToNewSpaceInRegion(start, end, slot_callback, clear_maps);
520 } else { 520 } else {
521 Page* page = reinterpret_cast<Page*>(chunk); 521 Page* page = reinterpret_cast<Page*>(chunk);
522 PagedSpace* owner = reinterpret_cast<PagedSpace*>(page->owner()); 522 ASSERT(page->owner() == heap_->map_space() ||
523 Address start = page->area_start(); 523 page->owner() == heap_->old_pointer_space());
524 Address end = page->area_end(); 524 CHECK(page->WasSweptPrecisely());
525 if (owner == heap_->map_space()) { 525
526 ASSERT(page->WasSweptPrecisely()); 526 HeapObjectIterator iterator(page, NULL);
527 HeapObjectIterator iterator(page, NULL); 527 for (HeapObject* heap_object = iterator.Next();
528 for (HeapObject* heap_object = iterator.Next(); heap_object != NULL; 528 heap_object != NULL;
529 heap_object = iterator.Next()) { 529 heap_object = iterator.Next()) {
530 // We skip free space objects. 530 // We iterate over objects that contain pointers only.
531 if (!heap_object->IsFiller()) { 531 if (heap_object->ContainsPointers()) {
532 FindPointersToNewSpaceInRegion( 532 FindPointersToNewSpaceInRegion(
533 heap_object->address() + HeapObject::kHeaderSize, 533 heap_object->address() + HeapObject::kHeaderSize,
534 heap_object->address() + heap_object->Size(), slot_callback, 534 heap_object->address() + heap_object->Size(),
535 clear_maps); 535 slot_callback,
536 } 536 clear_maps);
537 } 537 }
538 } else {
539 FindPointersToNewSpaceInRegion(
540 start, end, slot_callback, clear_maps);
541 } 538 }
542 } 539 }
543 } 540 }
544 } 541 }
545 if (callback_ != NULL) { 542 if (callback_ != NULL) {
546 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent); 543 (*callback_)(heap_, NULL, kStoreBufferScanningPageEvent);
547 } 544 }
548 } 545 }
549 } 546 }
550 547
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
596 } 593 }
597 old_buffer_is_sorted_ = false; 594 old_buffer_is_sorted_ = false;
598 old_buffer_is_filtered_ = false; 595 old_buffer_is_filtered_ = false;
599 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 596 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
600 ASSERT(old_top_ <= old_limit_); 597 ASSERT(old_top_ <= old_limit_);
601 } 598 }
602 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 599 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
603 } 600 }
604 601
605 } } // namespace v8::internal 602 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/spaces.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698