V8 Project
|
#include <store-buffer.h>
Public Member Functions | |
StoreBuffer (Heap *heap) | |
Address | TopAddress () |
void | SetUp () |
void | TearDown () |
void | Mark (Address addr) |
void | EnterDirectlyIntoStoreBuffer (Address addr) |
void | IteratePointersToNewSpace (ObjectSlotCallback callback) |
void | IteratePointersToNewSpaceAndClearMaps (ObjectSlotCallback callback) |
void | Compact () |
void | GCPrologue () |
void | GCEpilogue () |
Object *** | Limit () |
Object *** | Start () |
Object *** | Top () |
void | SetTop (Object ***top) |
bool | old_buffer_is_sorted () |
bool | old_buffer_is_filtered () |
void | SortUniq () |
void | EnsureSpace (intptr_t space_needed) |
void | Verify () |
bool | PrepareForIteration () |
void | Filter (int flag) |
Static Public Member Functions | |
static void | StoreBufferOverflow (Isolate *isolate) |
Static Public Attributes | |
static const int | kStoreBufferOverflowBit = 1 << (14 + kPointerSizeLog2) |
static const int | kStoreBufferSize = kStoreBufferOverflowBit |
static const int | kStoreBufferLength = kStoreBufferSize / sizeof(Address) |
static const int | kOldStoreBufferLength = kStoreBufferLength * 16 |
static const int | kHashSetLengthLog2 = 12 |
static const int | kHashSetLength = 1 << kHashSetLengthLog2 |
Private Member Functions | |
void | ClearFilteringHashSets () |
bool | SpaceAvailable (intptr_t space_needed) |
void | Uniq () |
void | ExemptPopularPages (int prime_sample_step, int threshold) |
void | ClearDeadObject (HeapObject *object) |
void | IteratePointersToNewSpace (ObjectSlotCallback callback, bool clear_maps) |
void | FindPointersToNewSpaceInRegion (Address start, Address end, ObjectSlotCallback slot_callback, bool clear_maps) |
void | IteratePointersOnPage (PagedSpace *space, Page *page, RegionCallback region_callback, ObjectSlotCallback slot_callback) |
void | IteratePointersInStoreBuffer (ObjectSlotCallback slot_callback, bool clear_maps) |
Friends | |
class | StoreBufferRebuildScope |
class | DontMoveStoreBufferEntriesScope |
Definition at line 28 of file store-buffer.h.
|
explicit |
Definition at line 16 of file store-buffer.cc.
|
inlineprivate |
Definition at line 54 of file store-buffer-inl.h.
References v8::internal::HeapObject::address(), v8::internal::Memory::Address_at(), v8::internal::PagedSpace::Contains(), heap_, v8::internal::Heap::map_space(), and NULL.
Referenced by FindPointersToNewSpaceInRegion(), and IteratePointersInStoreBuffer().
|
private |
Definition at line 312 of file store-buffer.cc.
References hash_set_1_, hash_set_2_, hash_sets_are_empty_, and kHashSetLength.
Referenced by Filter(), GCPrologue(), PrepareForIteration(), SetUp(), and SortUniq().
void v8::internal::StoreBuffer::Compact | ( | ) |
Definition at line 528 of file store-buffer.cc.
References v8::internal::Heap::cell_space(), v8::internal::Heap::code_space(), v8::internal::PagedSpace::Contains(), v8::internal::Isolate::counters(), DCHECK, EnsureSpace(), hash_set_1_, hash_set_2_, hash_sets_are_empty_, heap_, v8::internal::Heap::isolate(), kHashSetLength, kHashSetLengthLog2, v8::internal::Page::kPageAlignmentMask, v8::internal::kPointerSizeLog2, limit_, may_move_store_buffer_entries_, old_buffer_is_filtered_, old_buffer_is_sorted_, v8::internal::Heap::old_data_space(), old_limit_, old_top_, v8::internal::Heap::public_set_store_buffer_top(), and start_.
Referenced by EnsureSpace(), v8::internal::Heap::FreeQueuedChunks(), Mark(), PrepareForIteration(), SortUniq(), and StoreBufferOverflow().
void v8::internal::StoreBuffer::EnsureSpace | ( | intptr_t | space_needed | ) |
Definition at line 127 of file store-buffer.cc.
References CHECK, v8::base::VirtualMemory::Commit(), Compact(), DCHECK, ExemptPopularPages(), Filter(), heap_, v8::internal::Page::kPageSize, v8::internal::kPointerSize, may_move_store_buffer_entries_, NULL, old_buffer_is_filtered_, old_limit_, old_reserved_limit_, old_start_, old_top_, old_virtual_memory_, v8::internal::MemoryChunk::scan_on_scavenge(), v8::internal::MemoryChunk::SCAN_ON_SCAVENGE, SpaceAvailable(), and UNREACHABLE.
Referenced by v8::internal::StoreBufferRebuilder::Callback(), and Compact().
|
inline |
Definition at line 34 of file store-buffer-inl.h.
References callback_, v8::internal::Heap::cell_space(), v8::internal::Heap::code_space(), v8::internal::PagedSpace::Contains(), v8::internal::NewSpace::Contains(), DCHECK, v8::internal::MemoryChunk::FromAnyPointerAddress(), heap_, v8::internal::kStoreBufferFullEvent, v8::internal::Heap::new_space(), NULL, old_buffer_is_filtered_, old_buffer_is_sorted_, v8::internal::Heap::old_data_space(), old_limit_, old_top_, SLOW_DCHECK, and store_buffer_rebuilding_enabled_.
Referenced by FindPointersToNewSpaceInRegion(), v8::internal::Heap::IterateAndMarkPointersToFromSpace(), and IteratePointersInStoreBuffer().
Definition at line 184 of file store-buffer.cc.
References v8::internal::MemoryChunk::Contains(), Filter(), v8::internal::MemoryChunk::FromAnyPointerAddress(), heap_, NULL, old_buffer_is_filtered_, old_start_, old_top_, v8::internal::MemoryChunk::SCAN_ON_SCAVENGE, v8::internal::MemoryChunk::set_scan_on_scavenge(), v8::internal::MemoryChunk::set_store_buffer_counter(), and v8::internal::MemoryChunk::store_buffer_counter().
Referenced by EnsureSpace().
void v8::internal::StoreBuffer::Filter | ( | int | flag | ) |
Definition at line 215 of file store-buffer.cc.
References ClearFilteringHashSets(), v8::internal::MemoryChunk::Contains(), v8::internal::flag, v8::internal::MemoryChunk::FromAnyPointerAddress(), heap_, v8::internal::MemoryChunk::IsFlagSet(), NULL, old_start_, and old_top_.
Referenced by EnsureSpace(), ExemptPopularPages(), v8::internal::Heap::FreeQueuedChunks(), and PrepareForIteration().
|
private |
Definition at line 370 of file store-buffer.cc.
References ClearDeadObject(), DCHECK, EnterDirectlyIntoStoreBuffer(), heap_, v8::internal::Heap::InNewSpace(), v8::internal::kPointerSize, and v8::base::NoBarrier_Load().
Referenced by IteratePointersToNewSpace().
void v8::internal::StoreBuffer::GCEpilogue | ( | ) |
Definition at line 360 of file store-buffer.cc.
References during_gc_, and Verify().
Referenced by v8::internal::Heap::GarbageCollectionEpilogue().
void v8::internal::StoreBuffer::GCPrologue | ( | ) |
Definition at line 323 of file store-buffer.cc.
References ClearFilteringHashSets(), and during_gc_.
Referenced by v8::internal::Heap::GarbageCollectionPrologue().
|
private |
Definition at line 395 of file store-buffer.cc.
References ClearDeadObject(), DCHECK, EnterDirectlyIntoStoreBuffer(), heap_, v8::internal::Heap::InFromSpace(), v8::internal::Heap::InNewSpace(), v8::base::NoBarrier_Load(), old_start_, and old_top_.
Referenced by IteratePointersToNewSpace().
|
private |
void v8::internal::StoreBuffer::IteratePointersToNewSpace | ( | ObjectSlotCallback | callback | ) |
Definition at line 426 of file store-buffer.cc.
Referenced by IteratePointersToNewSpaceAndClearMaps(), and v8::internal::Heap::Scavenge().
|
private |
Definition at line 437 of file store-buffer.cc.
References v8::internal::HeapObject::address(), callback_, CHECK, DCHECK, v8::internal::MarkCompactCollector::EnsureSweepingCompleted(), FindPointersToNewSpaceInRegion(), v8::internal::LargePage::GetObject(), heap_, IteratePointersInStoreBuffer(), v8::internal::HeapObject::kHeaderSize, v8::internal::Map::kPointerFieldsBeginOffset, v8::internal::Map::kPointerFieldsEndOffset, v8::internal::kStoreBufferScanningPageEvent, v8::internal::kStoreBufferStartScanningPagesEvent, v8::internal::Heap::lo_space(), v8::internal::Heap::map_space(), v8::internal::Heap::mark_compact_collector(), v8::internal::HeapObjectIterator::Next(), NULL, v8::internal::Heap::old_pointer_space(), v8::internal::MemoryChunk::owner(), PrepareForIteration(), v8::internal::MemoryChunk::scan_on_scavenge(), v8::internal::MemoryChunk::set_scan_on_scavenge(), v8::internal::HeapObject::Size(), v8::internal::MemoryChunk::SweepingCompleted(), v8::internal::MarkCompactCollector::SweepInParallel(), and v8::internal::Page::WasSwept().
void v8::internal::StoreBuffer::IteratePointersToNewSpaceAndClearMaps | ( | ObjectSlotCallback | callback | ) |
Definition at line 431 of file store-buffer.cc.
References IteratePointersToNewSpace().
Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates().
|
inline |
Definition at line 79 of file store-buffer.h.
References old_limit_.
Referenced by v8::internal::StoreBufferRebuilder::Callback(), and SetTop().
|
inline |
Definition at line 18 of file store-buffer-inl.h.
References v8::internal::Heap::cell_space(), v8::internal::Heap::code_space(), Compact(), v8::internal::PagedSpace::Contains(), DCHECK, heap_, kStoreBufferOverflowBit, limit_, v8::internal::Heap::old_data_space(), and v8::internal::Heap::public_set_store_buffer_top().
Referenced by v8::internal::MarkCompactCollector::RecordMigratedSlot().
|
inline |
|
inline |
bool v8::internal::StoreBuffer::PrepareForIteration | ( | ) |
Definition at line 253 of file store-buffer.cc.
References ClearFilteringHashSets(), Compact(), Filter(), heap_, NULL, v8::internal::MemoryChunk::scan_on_scavenge(), and v8::internal::MemoryChunk::SCAN_ON_SCAVENGE.
Referenced by IteratePointersToNewSpace().
|
inline |
Definition at line 82 of file store-buffer.h.
References DCHECK, Limit(), old_top_, and Start().
Referenced by v8::internal::StoreBufferRebuilder::Callback().
void v8::internal::StoreBuffer::SetUp | ( | ) |
Definition at line 36 of file store-buffer.cc.
References v8::base::VirtualMemory::address(), CHECK, ClearFilteringHashSets(), v8::base::VirtualMemory::Commit(), v8::base::OS::CommitPageSize(), DCHECK, hash_set_1_, hash_set_2_, hash_sets_are_empty_, heap_, kHashSetLength, kOldStoreBufferLength, v8::internal::kPointerSize, kStoreBufferOverflowBit, kStoreBufferSize, limit_, old_limit_, old_reserved_limit_, old_start_, old_top_, old_virtual_memory_, v8::internal::Heap::public_set_store_buffer_top(), v8::internal::RoundUp(), v8::base::VirtualMemory::size(), start_, USE(), and virtual_memory_.
Referenced by v8::internal::Heap::SetUp().
void v8::internal::StoreBuffer::SortUniq | ( | ) |
Definition at line 239 of file store-buffer.cc.
References ClearFilteringHashSets(), Compact(), old_buffer_is_sorted_, old_start_, old_top_, and Uniq().
|
private |
Definition at line 122 of file store-buffer.cc.
References old_limit_, and old_top_.
Referenced by EnsureSpace().
|
inline |
Definition at line 80 of file store-buffer.h.
References old_start_.
Referenced by SetTop().
|
static |
Definition at line 98 of file store-buffer.cc.
References Compact(), v8::internal::Isolate::counters(), v8::internal::Isolate::heap(), and v8::internal::Heap::store_buffer().
void v8::internal::StoreBuffer::TearDown | ( | ) |
Definition at line 87 of file store-buffer.cc.
References hash_set_1_, hash_set_2_, heap_, limit_, NULL, old_limit_, old_reserved_limit_, old_start_, old_top_, old_virtual_memory_, v8::internal::Heap::public_set_store_buffer_top(), start_, and virtual_memory_.
Referenced by v8::internal::Heap::TearDown().
|
inline |
Definition at line 81 of file store-buffer.h.
References old_top_.
Referenced by v8::internal::StoreBufferRebuilder::Callback().
|
inline |
Definition at line 13 of file store-buffer-inl.h.
References heap_, and v8::internal::Heap::store_buffer_top_address().
|
private |
Definition at line 104 of file store-buffer.cc.
References DCHECK, heap_, v8::internal::Heap::InNewSpace(), may_move_store_buffer_entries_, NULL, old_start_, and old_top_.
Referenced by SortUniq().
void v8::internal::StoreBuffer::Verify | ( | ) |
Definition at line 353 of file store-buffer.cc.
References heap_, and v8::internal::Heap::lo_space().
Referenced by GCEpilogue().
|
friend |
Definition at line 174 of file store-buffer.h.
|
friend |
Definition at line 173 of file store-buffer.h.
|
private |
Definition at line 130 of file store-buffer.h.
Referenced by EnterDirectlyIntoStoreBuffer(), IteratePointersToNewSpace(), v8::internal::StoreBufferRebuildScope::StoreBufferRebuildScope(), and v8::internal::StoreBufferRebuildScope::~StoreBufferRebuildScope().
|
private |
Definition at line 125 of file store-buffer.h.
Referenced by GCEpilogue(), and GCPrologue().
|
private |
Definition at line 138 of file store-buffer.h.
Referenced by ClearFilteringHashSets(), Compact(), SetUp(), and TearDown().
|
private |
Definition at line 139 of file store-buffer.h.
Referenced by ClearFilteringHashSets(), Compact(), SetUp(), and TearDown().
|
private |
Definition at line 140 of file store-buffer.h.
Referenced by ClearFilteringHashSets(), Compact(), and SetUp().
|
private |
Definition at line 109 of file store-buffer.h.
Referenced by ClearDeadObject(), Compact(), EnsureSpace(), EnterDirectlyIntoStoreBuffer(), ExemptPopularPages(), Filter(), FindPointersToNewSpaceInRegion(), IteratePointersInStoreBuffer(), IteratePointersToNewSpace(), Mark(), PrepareForIteration(), SetUp(), TearDown(), TopAddress(), Uniq(), and Verify().
|
static |
Definition at line 72 of file store-buffer.h.
Referenced by ClearFilteringHashSets(), Compact(), and SetUp().
|
static |
Definition at line 71 of file store-buffer.h.
Referenced by Compact().
|
static |
Definition at line 70 of file store-buffer.h.
Referenced by SetUp().
|
static |
Definition at line 69 of file store-buffer.h.
|
static |
Definition at line 67 of file store-buffer.h.
|
static |
Definition at line 68 of file store-buffer.h.
Referenced by v8::internal::StoreBufferRebuilder::Callback(), and SetUp().
|
private |
Definition at line 115 of file store-buffer.h.
Referenced by Compact(), Mark(), SetUp(), and TearDown().
|
private |
Definition at line 131 of file store-buffer.h.
Referenced by Compact(), v8::internal::DontMoveStoreBufferEntriesScope::DontMoveStoreBufferEntriesScope(), EnsureSpace(), Uniq(), and v8::internal::DontMoveStoreBufferEntriesScope::~DontMoveStoreBufferEntriesScope().
|
private |
Definition at line 124 of file store-buffer.h.
Referenced by Compact(), EnsureSpace(), EnterDirectlyIntoStoreBuffer(), ExemptPopularPages(), and old_buffer_is_filtered().
|
private |
Definition at line 123 of file store-buffer.h.
Referenced by Compact(), EnterDirectlyIntoStoreBuffer(), old_buffer_is_sorted(), and SortUniq().
|
private |
Definition at line 118 of file store-buffer.h.
Referenced by Compact(), EnsureSpace(), EnterDirectlyIntoStoreBuffer(), Limit(), SetUp(), SpaceAvailable(), and TearDown().
|
private |
Definition at line 120 of file store-buffer.h.
Referenced by EnsureSpace(), SetUp(), and TearDown().
|
private |
Definition at line 117 of file store-buffer.h.
Referenced by EnsureSpace(), ExemptPopularPages(), Filter(), IteratePointersInStoreBuffer(), SetUp(), SortUniq(), Start(), TearDown(), and Uniq().
|
private |
Definition at line 119 of file store-buffer.h.
Referenced by Compact(), EnsureSpace(), EnterDirectlyIntoStoreBuffer(), ExemptPopularPages(), Filter(), IteratePointersInStoreBuffer(), SetTop(), SetUp(), SortUniq(), SpaceAvailable(), TearDown(), Top(), and Uniq().
|
private |
Definition at line 121 of file store-buffer.h.
Referenced by EnsureSpace(), SetUp(), and TearDown().
|
private |
Definition at line 114 of file store-buffer.h.
Referenced by Compact(), SetUp(), and TearDown().
|
private |
Definition at line 129 of file store-buffer.h.
Referenced by EnterDirectlyIntoStoreBuffer(), v8::internal::StoreBufferRebuildScope::StoreBufferRebuildScope(), and v8::internal::StoreBufferRebuildScope::~StoreBufferRebuildScope().
|
private |
Definition at line 133 of file store-buffer.h.
Referenced by SetUp(), and TearDown().