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

Side by Side Diff: src/heap/heap.cc

Issue 1305733003: Don't filter store buffer after sweeping. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@store-buffer-filtering-for-free
Patch Set: Created 5 years, 4 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 | « src/heap/heap.h ('k') | src/heap/mark-compact.cc » ('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 // 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/heap.h" 5 #include "src/heap/heap.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.h"
8 #include "src/api.h" 8 #include "src/api.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/base/once.h" 10 #include "src/base/once.h"
(...skipping 6643 matching lines...) Expand 10 before | Expand all | Expand 10 after
6654 old_space_strings_.Free(); 6654 old_space_strings_.Free();
6655 } 6655 }
6656 6656
6657 6657
6658 void Heap::QueueMemoryChunkForFree(MemoryChunk* chunk) { 6658 void Heap::QueueMemoryChunkForFree(MemoryChunk* chunk) {
6659 chunk->set_next_chunk(chunks_queued_for_free_); 6659 chunk->set_next_chunk(chunks_queued_for_free_);
6660 chunks_queued_for_free_ = chunk; 6660 chunks_queued_for_free_ = chunk;
6661 } 6661 }
6662 6662
6663 6663
6664 void Heap::FreeQueuedChunks() { 6664 void Heap::FilterStoreBufferEntriesOnAboutToBeFreedPages() {
6665 if (chunks_queued_for_free_ == NULL) return; 6665 if (chunks_queued_for_free_ == NULL) return;
6666 MemoryChunk* next; 6666 MemoryChunk* next;
6667 MemoryChunk* chunk; 6667 MemoryChunk* chunk;
6668 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6668 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6669 next = chunk->next_chunk(); 6669 next = chunk->next_chunk();
6670 chunk->SetFlag(MemoryChunk::ABOUT_TO_BE_FREED); 6670 chunk->SetFlag(MemoryChunk::ABOUT_TO_BE_FREED);
6671 } 6671 }
6672 isolate_->heap()->store_buffer()->Compact(); 6672 isolate_->heap()->store_buffer()->Compact();
6673 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 6673 isolate_->heap()->store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
6674 }
6675
6676
6677 void Heap::FreeQueuedChunks() {
6678 MemoryChunk* next;
6679 MemoryChunk* chunk;
6674 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 6680 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
6675 next = chunk->next_chunk(); 6681 next = chunk->next_chunk();
6676 isolate_->memory_allocator()->Free(chunk); 6682 isolate_->memory_allocator()->Free(chunk);
6677 } 6683 }
6678 chunks_queued_for_free_ = NULL; 6684 chunks_queued_for_free_ = NULL;
6679 } 6685 }
6680 6686
6681 6687
6682 void Heap::RememberUnmappedPage(Address page, bool compacted) { 6688 void Heap::RememberUnmappedPage(Address page, bool compacted) {
6683 uintptr_t p = reinterpret_cast<uintptr_t>(page); 6689 uintptr_t p = reinterpret_cast<uintptr_t>(page);
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after
6872 *object_type = "CODE_TYPE"; \ 6878 *object_type = "CODE_TYPE"; \
6873 *object_sub_type = "CODE_AGE/" #name; \ 6879 *object_sub_type = "CODE_AGE/" #name; \
6874 return true; 6880 return true;
6875 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME) 6881 CODE_AGE_LIST_COMPLETE(COMPARE_AND_RETURN_NAME)
6876 #undef COMPARE_AND_RETURN_NAME 6882 #undef COMPARE_AND_RETURN_NAME
6877 } 6883 }
6878 return false; 6884 return false;
6879 } 6885 }
6880 } // namespace internal 6886 } // namespace internal
6881 } // namespace v8 6887 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698