V8 Project
v8::internal::StoreBufferRebuilder Class Reference

#include <heap.h>

+ Collaboration diagram for v8::internal::StoreBufferRebuilder:

Public Member Functions

 StoreBufferRebuilder (StoreBuffer *store_buffer)
 
void Callback (MemoryChunk *page, StoreBufferEvent event)
 

Private Attributes

StoreBufferstore_buffer_
 
Object *** start_of_current_page_
 
MemoryChunkcurrent_page_
 

Detailed Description

Definition at line 349 of file heap.h.

Constructor & Destructor Documentation

◆ StoreBufferRebuilder()

v8::internal::StoreBufferRebuilder::StoreBufferRebuilder ( StoreBuffer store_buffer)
inlineexplicit

Definition at line 351 of file heap.h.

352  : store_buffer_(store_buffer) {}

Member Function Documentation

◆ Callback()

void v8::internal::StoreBufferRebuilder::Callback ( MemoryChunk page,
StoreBufferEvent  event 
)

Definition at line 1315 of file heap.cc.

1315  {
1316  if (event == kStoreBufferStartScanningPagesEvent) {
1318  current_page_ = NULL;
1319  } else if (event == kStoreBufferScanningPageEvent) {
1320  if (current_page_ != NULL) {
1321  // If this page already overflowed the store buffer during this iteration.
1323  // Then we should wipe out the entries that have been added for it.
1325  } else if (store_buffer_->Top() - start_of_current_page_ >=
1326  (store_buffer_->Limit() - store_buffer_->Top()) >> 2) {
1327  // Did we find too many pointers in the previous page? The heuristic is
1328  // that no page can take more then 1/5 the remaining slots in the store
1329  // buffer.
1332  } else {
1333  // In this case the page we scanned took a reasonable number of slots in
1334  // the store buffer. It has now been rehabilitated and is no longer
1335  // marked scan_on_scavenge.
1337  }
1338  }
1340  current_page_ = page;
1341  } else if (event == kStoreBufferFullEvent) {
1342  // The current page overflowed the store buffer again. Wipe out its entries
1343  // in the store buffer and mark it scan-on-scavenge again. This may happen
1344  // several times while scanning.
1345  if (current_page_ == NULL) {
1346  // Store Buffer overflowed while scanning promoted objects. These are not
1347  // in any particular page, though they are likely to be clustered by the
1348  // allocation routines.
1350  } else {
1351  // Store Buffer overflowed while scanning a particular old space page for
1352  // pointers to new space.
1353  DCHECK(current_page_ == page);
1354  DCHECK(page != NULL);
1358  }
1359  } else {
1360  UNREACHABLE();
1361  }
1362 }
void set_scan_on_scavenge(bool scan)
Definition: spaces-inl.h:157
void EnsureSpace(intptr_t space_needed)
static const int kStoreBufferSize
Definition: store-buffer.h:68
void SetTop(Object ***top)
Definition: store-buffer.h:82
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define UNREACHABLE()
Definition: logging.h:30
#define DCHECK(condition)
Definition: logging.h:205
@ kStoreBufferScanningPageEvent
Definition: globals.h:496
@ kStoreBufferStartScanningPagesEvent
Definition: globals.h:495
@ kStoreBufferFullEvent
Definition: globals.h:494

References current_page_, DCHECK, v8::internal::StoreBuffer::EnsureSpace(), v8::internal::kStoreBufferFullEvent, v8::internal::kStoreBufferScanningPageEvent, v8::internal::StoreBuffer::kStoreBufferSize, v8::internal::kStoreBufferStartScanningPagesEvent, v8::internal::StoreBuffer::Limit(), NULL, v8::internal::MemoryChunk::scan_on_scavenge(), v8::internal::MemoryChunk::set_scan_on_scavenge(), v8::internal::StoreBuffer::SetTop(), start_of_current_page_, store_buffer_, v8::internal::StoreBuffer::Top(), and UNREACHABLE.

Referenced by v8::internal::Heap::ScavengeStoreBufferCallback().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ current_page_

MemoryChunk* v8::internal::StoreBufferRebuilder::current_page_
private

Definition at line 365 of file heap.h.

Referenced by Callback().

◆ start_of_current_page_

Object*** v8::internal::StoreBufferRebuilder::start_of_current_page_
private

Definition at line 363 of file heap.h.

Referenced by Callback().

◆ store_buffer_

StoreBuffer* v8::internal::StoreBufferRebuilder::store_buffer_
private

Definition at line 357 of file heap.h.

Referenced by Callback().


The documentation for this class was generated from the following files: