v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::MarkingBitmap Class Referencefinal

#include <marking.h>

Collaboration diagram for v8::internal::MarkingBitmap:

Public Types

using CellType = MarkBit::CellType
 
using CellIndex = uint32_t
 
using MarkBitIndex = uint32_t
 

Public Member Functions

 MarkingBitmap ()=default
 
 MarkingBitmap (const MarkingBitmap &)=delete
 
MarkingBitmapoperator= (const MarkingBitmap &)=delete
 
V8_INLINE CellTypecells ()
 
V8_INLINE const CellTypecells () const
 
bool AllBitsClearInRange (MarkBitIndex start_index, MarkBitIndex end_index) const
 
bool AllBitsSetInRange (MarkBitIndex start_index, MarkBitIndex end_index) const
 
template<AccessMode mode>
void Clear ()
 
template<AccessMode mode>
void SetRange (MarkBitIndex start_index, MarkBitIndex end_index)
 
template<AccessMode mode>
void ClearRange (MarkBitIndex start_index, MarkBitIndex end_index)
 
bool IsClean () const
 
void Print () const
 
V8_INLINE MarkBit MarkBitFromIndexForTesting (uint32_t index)
 

Static Public Member Functions

static V8_INLINE constexpr MarkBitIndex AddressToIndex (Address address)
 
static V8_INLINE constexpr MarkBitIndex LimitAddressToIndex (Address address)
 
static V8_INLINE constexpr CellIndex IndexToCell (MarkBitIndex index)
 
static V8_INLINE constexpr Address IndexToAddressOffset (MarkBitIndex index)
 
static V8_INLINE constexpr Address CellToBase (CellIndex cell_index)
 
static V8_INLINE constexpr uint32_t IndexInCell (MarkBitIndex index)
 
static V8_INLINE constexpr CellType IndexInCellMask (MarkBitIndex index)
 
static V8_INLINE constexpr uint32_t CellAlignIndex (uint32_t index)
 
static V8_INLINE MarkingBitmapCast (Address addr)
 
static V8_INLINE MarkBit MarkBitFromAddress (Address address)
 
static V8_INLINE MarkBit MarkBitFromAddress (MarkingBitmap *bitmap, Address address)
 
static Address FindPreviousValidObject (const PageMetadata *page, Address maybe_inner_ptr)
 

Static Public Attributes

static constexpr uint32_t kBitsPerCell = sizeof(CellType) * kBitsPerByte
 
static constexpr uint32_t kBitsPerCellLog2
 
static constexpr uint32_t kBitIndexMask = kBitsPerCell - 1
 
static constexpr uint32_t kBytesPerCell = kBitsPerCell / kBitsPerByte
 
static constexpr uint32_t kBytesPerCellLog2
 
static constexpr size_t kLength = ((1 << kPageSizeBits) >> kTaggedSizeLog2)
 
static constexpr size_t kCellsCount
 
static constexpr size_t kSize = kCellsCount * kBytesPerCell
 

Private Member Functions

template<AccessMode mode>
void SetBitsInCell (uint32_t cell_index, MarkBit::CellType mask)
 
template<AccessMode mode>
void ClearBitsInCell (uint32_t cell_index, MarkBit::CellType mask)
 
template<AccessMode mode>
void SetCellRangeRelaxed (uint32_t start_cell_index, uint32_t end_cell_index)
 
template<AccessMode mode>
void ClearCellRangeRelaxed (uint32_t start_cell_index, uint32_t end_cell_index)
 

Static Private Member Functions

static V8_INLINE MarkingBitmapFromAddress (Address address)
 

Private Attributes

CellType cells_ [kCellsCount] = {0}
 

Detailed Description

Definition at line 92 of file marking.h.

Member Typedef Documentation

◆ CellIndex

Definition at line 95 of file marking.h.

◆ CellType

◆ MarkBitIndex

Definition at line 96 of file marking.h.

Constructor & Destructor Documentation

◆ MarkingBitmap() [1/2]

v8::internal::MarkingBitmap::MarkingBitmap ( )
default

◆ MarkingBitmap() [2/2]

v8::internal::MarkingBitmap::MarkingBitmap ( const MarkingBitmap & )
delete

Member Function Documentation

◆ AddressToIndex()

MarkingBitmap::MarkBitIndex v8::internal::MarkingBitmap::AddressToIndex ( Address address)
staticconstexpr

Definition at line 174 of file marking-inl.h.

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

◆ AllBitsClearInRange()

bool v8::internal::MarkingBitmap::AllBitsClearInRange ( MarkBitIndex start_index,
MarkBitIndex end_index ) const

Definition at line 44 of file marking.cc.

Here is the call graph for this function:

◆ AllBitsSetInRange()

bool v8::internal::MarkingBitmap::AllBitsSetInRange ( MarkBitIndex start_index,
MarkBitIndex end_index ) const

Definition at line 17 of file marking.cc.

Here is the call graph for this function:

◆ Cast()

static V8_INLINE MarkingBitmap * v8::internal::MarkingBitmap::Cast ( Address addr)
inlinestatic

Definition at line 144 of file marking.h.

Here is the caller graph for this function:

◆ CellAlignIndex()

static V8_INLINE constexpr uint32_t v8::internal::MarkingBitmap::CellAlignIndex ( uint32_t index)
inlinestaticconstexpr

Definition at line 140 of file marking.h.

◆ cells() [1/2]

V8_INLINE CellType * v8::internal::MarkingBitmap::cells ( )
inline

Definition at line 158 of file marking.h.

Here is the caller graph for this function:

◆ cells() [2/2]

V8_INLINE const CellType * v8::internal::MarkingBitmap::cells ( ) const
inline

Definition at line 159 of file marking.h.

◆ CellToBase()

static V8_INLINE constexpr Address v8::internal::MarkingBitmap::CellToBase ( CellIndex cell_index)
inlinestaticconstexpr

Definition at line 127 of file marking.h.

Here is the caller graph for this function:

◆ Clear()

template<AccessMode mode>
void v8::internal::MarkingBitmap::Clear ( )
inline

Definition at line 81 of file marking-inl.h.

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

◆ ClearBitsInCell()

template<AccessMode mode>
void v8::internal::MarkingBitmap::ClearBitsInCell ( uint32_t cell_index,
MarkBit::CellType mask )
inlineprivate
Here is the caller graph for this function:

◆ ClearCellRangeRelaxed()

template<AccessMode mode>
void v8::internal::MarkingBitmap::ClearCellRangeRelaxed ( uint32_t start_cell_index,
uint32_t end_cell_index )
inlineprivate
Here is the caller graph for this function:

◆ ClearRange()

template<AccessMode mode>
void v8::internal::MarkingBitmap::ClearRange ( MarkBitIndex start_index,
MarkBitIndex end_index )
inline

Definition at line 121 of file marking-inl.h.

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

◆ FindPreviousValidObject()

Address v8::internal::MarkingBitmap::FindPreviousValidObject ( const PageMetadata * page,
Address maybe_inner_ptr )
inlinestatic

Definition at line 187 of file marking-inl.h.

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

◆ FromAddress()

MarkingBitmap * v8::internal::MarkingBitmap::FromAddress ( Address address)
staticprivate

Definition at line 152 of file marking-inl.h.

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

◆ IndexInCell()

static V8_INLINE constexpr uint32_t v8::internal::MarkingBitmap::IndexInCell ( MarkBitIndex index)
inlinestaticconstexpr

Definition at line 131 of file marking.h.

Here is the caller graph for this function:

◆ IndexInCellMask()

static V8_INLINE constexpr CellType v8::internal::MarkingBitmap::IndexInCellMask ( MarkBitIndex index)
inlinestaticconstexpr

Definition at line 135 of file marking.h.

Here is the caller graph for this function:

◆ IndexToAddressOffset()

static V8_INLINE constexpr Address v8::internal::MarkingBitmap::IndexToAddressOffset ( MarkBitIndex index)
inlinestaticconstexpr

Definition at line 123 of file marking.h.

Here is the caller graph for this function:

◆ IndexToCell()

static V8_INLINE constexpr CellIndex v8::internal::MarkingBitmap::IndexToCell ( MarkBitIndex index)
inlinestaticconstexpr

Definition at line 119 of file marking.h.

Here is the caller graph for this function:

◆ IsClean()

bool v8::internal::MarkingBitmap::IsClean ( ) const

Definition at line 132 of file marking.cc.

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

◆ LimitAddressToIndex()

MarkingBitmap::MarkBitIndex v8::internal::MarkingBitmap::LimitAddressToIndex ( Address address)
staticconstexpr

Definition at line 180 of file marking-inl.h.

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

◆ MarkBitFromAddress() [1/2]

MarkBit v8::internal::MarkingBitmap::MarkBitFromAddress ( Address address)
static

Definition at line 159 of file marking-inl.h.

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

◆ MarkBitFromAddress() [2/2]

MarkBit v8::internal::MarkingBitmap::MarkBitFromAddress ( MarkingBitmap * bitmap,
Address address )
static

Definition at line 164 of file marking-inl.h.

Here is the call graph for this function:

◆ MarkBitFromIndexForTesting()

V8_INLINE MarkBit v8::internal::MarkingBitmap::MarkBitFromIndexForTesting ( uint32_t index)
inline

Definition at line 190 of file marking.h.

◆ operator=()

MarkingBitmap & v8::internal::MarkingBitmap::operator= ( const MarkingBitmap & )
delete

◆ Print()

void v8::internal::MarkingBitmap::Print ( ) const

Definition at line 123 of file marking.cc.

Here is the call graph for this function:

◆ SetBitsInCell()

template<AccessMode mode>
void v8::internal::MarkingBitmap::SetBitsInCell ( uint32_t cell_index,
MarkBit::CellType mask )
inlineprivate
Here is the caller graph for this function:

◆ SetCellRangeRelaxed()

template<AccessMode mode>
void v8::internal::MarkingBitmap::SetCellRangeRelaxed ( uint32_t start_cell_index,
uint32_t end_cell_index )
private
Here is the caller graph for this function:

◆ SetRange()

template<AccessMode mode>
void v8::internal::MarkingBitmap::SetRange ( MarkBitIndex start_index,
MarkBitIndex end_index )
inline

Definition at line 91 of file marking-inl.h.

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

Member Data Documentation

◆ cells_

CellType v8::internal::MarkingBitmap::cells_[kCellsCount] = {0}
private

Definition at line 230 of file marking.h.

◆ kBitIndexMask

uint32_t v8::internal::MarkingBitmap::kBitIndexMask = kBitsPerCell - 1
staticconstexpr

Definition at line 101 of file marking.h.

◆ kBitsPerCell

uint32_t v8::internal::MarkingBitmap::kBitsPerCell = sizeof(CellType) * kBitsPerByte
staticconstexpr

Definition at line 98 of file marking.h.

◆ kBitsPerCellLog2

uint32_t v8::internal::MarkingBitmap::kBitsPerCellLog2
staticconstexpr
Initial value:
=
static constexpr uint32_t kBitsPerCell
Definition marking.h:98
constexpr unsigned CountTrailingZeros(T value)
Definition bits.h:144

Definition at line 99 of file marking.h.

◆ kBytesPerCell

uint32_t v8::internal::MarkingBitmap::kBytesPerCell = kBitsPerCell / kBitsPerByte
staticconstexpr

Definition at line 102 of file marking.h.

◆ kBytesPerCellLog2

uint32_t v8::internal::MarkingBitmap::kBytesPerCellLog2
staticconstexpr
Initial value:
=
static constexpr uint32_t kBitsPerCellLog2
Definition marking.h:99
constexpr int kBitsPerByteLog2
Definition globals.h:683

Definition at line 103 of file marking.h.

◆ kCellsCount

size_t v8::internal::MarkingBitmap::kCellsCount
staticconstexpr
Initial value:
=
static constexpr size_t kLength
Definition marking.h:107

Definition at line 109 of file marking.h.

◆ kLength

size_t v8::internal::MarkingBitmap::kLength = ((1 << kPageSizeBits) >> kTaggedSizeLog2)
staticconstexpr

Definition at line 107 of file marking.h.

◆ kSize

size_t v8::internal::MarkingBitmap::kSize = kCellsCount * kBytesPerCell
staticconstexpr

Definition at line 113 of file marking.h.


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