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

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

Issue 994893002: Don't scan on scavenge dead large objects. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/base/atomicops.h" 9 #include "src/base/atomicops.h"
10 #include "src/counters.h" 10 #include "src/counters.h"
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 if (heap_->InNewSpace(object)) { 445 if (heap_->InNewSpace(object)) {
446 if (heap_->mark_compact_collector()->IsSlotInLiveObject( 446 if (heap_->mark_compact_collector()->IsSlotInLiveObject(
447 reinterpret_cast<HeapObject**>(slot), 447 reinterpret_cast<HeapObject**>(slot),
448 reinterpret_cast<HeapObject*>(object))) { 448 reinterpret_cast<HeapObject*>(object))) {
449 *new_top++ = addr; 449 *new_top++ = addr;
450 } 450 }
451 } 451 }
452 } 452 }
453 old_top_ = new_top; 453 old_top_ = new_top;
454 ClearFilteringHashSets(); 454 ClearFilteringHashSets();
455
456 // Don't scan on scavenge dead large objects.
457 LargeObjectIterator it(heap_->lo_space());
458 for (HeapObject* object = it.Next(); object != NULL; object = it.Next()) {
459 MemoryChunk* chunk = MemoryChunk::FromAddress(object->address());
460 if (chunk->scan_on_scavenge() && !Marking::MarkBitFrom(object).Get()) {
461 chunk->set_scan_on_scavenge(false);
462 }
463 }
455 } 464 }
456 465
457 466
458 void StoreBuffer::VerifyValidStoreBufferEntries() { 467 void StoreBuffer::VerifyValidStoreBufferEntries() {
459 for (Address* current = old_start_; current < old_top_; current++) { 468 for (Address* current = old_start_; current < old_top_; current++) {
460 Object** slot = reinterpret_cast<Object**>(*current); 469 Object** slot = reinterpret_cast<Object**>(*current);
461 Object* object = reinterpret_cast<Object*>( 470 Object* object = reinterpret_cast<Object*>(
462 base::NoBarrier_Load(reinterpret_cast<base::AtomicWord*>(slot))); 471 base::NoBarrier_Load(reinterpret_cast<base::AtomicWord*>(slot)));
463 CHECK(heap_->InNewSpace(object)); 472 CHECK(heap_->InNewSpace(object));
464 heap_->mark_compact_collector()->VerifyIsSlotInLiveObject( 473 heap_->mark_compact_collector()->VerifyIsSlotInLiveObject(
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
646 } 655 }
647 old_buffer_is_sorted_ = false; 656 old_buffer_is_sorted_ = false;
648 old_buffer_is_filtered_ = false; 657 old_buffer_is_filtered_ = false;
649 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2); 658 *old_top_++ = reinterpret_cast<Address>(int_addr << kPointerSizeLog2);
650 DCHECK(old_top_ <= old_limit_); 659 DCHECK(old_top_ <= old_limit_);
651 } 660 }
652 heap_->isolate()->counters()->store_buffer_compactions()->Increment(); 661 heap_->isolate()->counters()->store_buffer_compactions()->Increment();
653 } 662 }
654 } 663 }
655 } // namespace v8::internal 664 } // namespace v8::internal
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