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

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

Issue 1493653002: [heap] Clean up stale store buffer entries for aborted pages. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
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/ast/scopeinfo.h" 9 #include "src/ast/scopeinfo.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 5943 matching lines...) Expand 10 before | Expand all | Expand 10 after
5954 // PreFree logically frees the memory chunk. However, the actual freeing 5954 // PreFree logically frees the memory chunk. However, the actual freeing
5955 // will happen on a separate thread sometime later. 5955 // will happen on a separate thread sometime later.
5956 isolate_->memory_allocator()->PreFreeMemory(chunk); 5956 isolate_->memory_allocator()->PreFreeMemory(chunk);
5957 5957
5958 // The chunks added to this queue will be freed by a concurrent thread. 5958 // The chunks added to this queue will be freed by a concurrent thread.
5959 chunk->set_next_chunk(chunks_queued_for_free_); 5959 chunk->set_next_chunk(chunks_queued_for_free_);
5960 chunks_queued_for_free_ = chunk; 5960 chunks_queued_for_free_ = chunk;
5961 } 5961 }
5962 5962
5963 5963
5964 void Heap::FilterStoreBufferEntriesForAbortedPages() {
5965 store_buffer()->Filter(MemoryChunk::COMPACTION_WAS_ABORTED);
5966 }
5967
5968
5964 void Heap::FilterStoreBufferEntriesOnAboutToBeFreedPages() { 5969 void Heap::FilterStoreBufferEntriesOnAboutToBeFreedPages() {
5965 if (chunks_queued_for_free_ == NULL) return; 5970 if (chunks_queued_for_free_ == NULL) return;
5966 MemoryChunk* next; 5971 MemoryChunk* next;
5967 MemoryChunk* chunk; 5972 MemoryChunk* chunk;
5968 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) { 5973 for (chunk = chunks_queued_for_free_; chunk != NULL; chunk = next) {
5969 next = chunk->next_chunk(); 5974 next = chunk->next_chunk();
5970 chunk->SetFlag(MemoryChunk::ABOUT_TO_BE_FREED); 5975 chunk->SetFlag(MemoryChunk::ABOUT_TO_BE_FREED);
5971 } 5976 }
5972 store_buffer()->Compact(); 5977 store_buffer()->Compact();
5973 store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED); 5978 store_buffer()->Filter(MemoryChunk::ABOUT_TO_BE_FREED);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
6099 } 6104 }
6100 6105
6101 6106
6102 // static 6107 // static
6103 int Heap::GetStaticVisitorIdForMap(Map* map) { 6108 int Heap::GetStaticVisitorIdForMap(Map* map) {
6104 return StaticVisitorBase::GetVisitorId(map); 6109 return StaticVisitorBase::GetVisitorId(map);
6105 } 6110 }
6106 6111
6107 } // namespace internal 6112 } // namespace internal
6108 } // namespace v8 6113 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/mark-compact.cc » ('j') | src/heap/spaces.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698