V8 Project
v8::internal::SkipList Class Reference

#include <spaces.h>

+ Collaboration diagram for v8::internal::SkipList:

Public Member Functions

 SkipList ()
 
void Clear ()
 
Address StartFor (Address addr)
 
void AddObject (Address addr, int size)
 

Static Public Member Functions

static int RegionNumber (Address addr)
 
static void Update (Address addr, int size)
 

Private Member Functions

 STATIC_ASSERT (Page::kPageSize % kRegionSize==0)
 

Private Attributes

Address starts_ [kSize]
 

Static Private Attributes

static const int kRegionSizeLog2 = 13
 
static const int kRegionSize = 1 << kRegionSizeLog2
 
static const int kSize = Page::kPageSize / kRegionSize
 

Detailed Description

Definition at line 948 of file spaces.h.

Constructor & Destructor Documentation

◆ SkipList()

v8::internal::SkipList::SkipList ( )
inline

Definition at line 950 of file spaces.h.

950 { Clear(); }

References Clear().

Referenced by Update().

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

Member Function Documentation

◆ AddObject()

void v8::internal::SkipList::AddObject ( Address  addr,
int  size 
)
inline

Definition at line 960 of file spaces.h.

960  {
961  int start_region = RegionNumber(addr);
962  int end_region = RegionNumber(addr + size - kPointerSize);
963  for (int idx = start_region; idx <= end_region; idx++) {
964  if (starts_[idx] > addr) starts_[idx] = addr;
965  }
966  }
Address starts_[kSize]
Definition: spaces.h:990
static int RegionNumber(Address addr)
Definition: spaces.h:968
enable harmony numeric enable harmony object literal extensions Optimize object size
const int kPointerSize
Definition: globals.h:129

References v8::internal::kPointerSize, RegionNumber(), size, and starts_.

Referenced by v8::internal::Sweep(), and Update().

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

◆ Clear()

void v8::internal::SkipList::Clear ( )
inline

Definition at line 952 of file spaces.h.

952  {
953  for (int idx = 0; idx < kSize; idx++) {
954  starts_[idx] = reinterpret_cast<Address>(-1);
955  }
956  }
static const int kSize
Definition: spaces.h:986
byte * Address
Definition: globals.h:101

References kSize, and starts_.

Referenced by v8::internal::MarkCompactCollector::EvacuateNewSpaceAndCandidates(), SkipList(), and v8::internal::Sweep().

+ Here is the caller graph for this function:

◆ RegionNumber()

static int v8::internal::SkipList::RegionNumber ( Address  addr)
inlinestatic

Definition at line 968 of file spaces.h.

968  {
970  }
static const intptr_t kPageAlignmentMask
Definition: spaces.h:757
static const int kRegionSizeLog2
Definition: spaces.h:984
intptr_t OffsetFrom(T x)
Definition: macros.h:383

References v8::internal::Page::kPageAlignmentMask, kRegionSizeLog2, and OffsetFrom().

Referenced by AddObject(), StartFor(), and v8::internal::Sweep().

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

◆ StartFor()

Address v8::internal::SkipList::StartFor ( Address  addr)
inline

Definition at line 958 of file spaces.h.

958 { return starts_[RegionNumber(addr)]; }

References RegionNumber(), and starts_.

Referenced by v8::internal::InnerPointerToCodeCache::GcSafeFindCodeForInnerPointer().

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

◆ STATIC_ASSERT()

v8::internal::SkipList::STATIC_ASSERT ( Page::kPageSize kRegionSize = =0)
private

◆ Update()

static void v8::internal::SkipList::Update ( Address  addr,
int  size 
)
inlinestatic

Definition at line 972 of file spaces.h.

972  {
973  Page* page = Page::FromAddress(addr);
974  SkipList* list = page->skip_list();
975  if (list == NULL) {
976  list = new SkipList();
977  page->set_skip_list(list);
978  }
979 
980  list->AddObject(addr, size);
981  }
static MemoryChunk * FromAddress(Address a)
Definition: spaces.h:276
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

References AddObject(), v8::internal::MemoryChunk::FromAddress(), NULL, v8::internal::MemoryChunk::set_skip_list(), size, v8::internal::MemoryChunk::skip_list(), and SkipList().

Referenced by v8::internal::PagedSpace::AllocateRaw().

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

Member Data Documentation

◆ kRegionSize

const int v8::internal::SkipList::kRegionSize = 1 << kRegionSizeLog2
staticprivate

Definition at line 985 of file spaces.h.

◆ kRegionSizeLog2

const int v8::internal::SkipList::kRegionSizeLog2 = 13
staticprivate

Definition at line 984 of file spaces.h.

Referenced by RegionNumber().

◆ kSize

const int v8::internal::SkipList::kSize = Page::kPageSize / kRegionSize
staticprivate

Definition at line 986 of file spaces.h.

Referenced by Clear().

◆ starts_

Address v8::internal::SkipList::starts_[kSize]
private

Definition at line 990 of file spaces.h.

Referenced by AddObject(), Clear(), and StartFor().


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