webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Friends | List of all members
JSC::MarkedSpace Class Reference

#include <MarkedSpace.h>

Public Types

typedef HashSet< MarkedBlock * >::iterator BlockIterator
 
typedef HashSet< MarkedBlock * >::iterator BlockIterator
 

Public Member Functions

 MarkedSpace (Heap *)
 
 ~MarkedSpace ()
 
Heapheap () const
 
void lastChanceToFinalize ()
 
void prepareForAllocation ()
 
void visitWeakSets (SlotVisitor &)
 
void reapWeakSets ()
 
MarkedBlockSetblocks ()
 
void willStartIterating ()
 
bool isIterating () const
 
void didFinishIterating ()
 
void stopAllocating ()
 
void resumeAllocating ()
 
void prepareForMarking ()
 
void prepareForConservativeScan ()
 
template<typename Functor >
void forEachLiveCell (HeapIterationScope &, const Functor &)
 
template<typename Functor >
void forEachDeadCell (HeapIterationScope &, const Functor &)
 
template<typename Functor >
void forEachBlock (const Functor &)
 
void shrink ()
 
void freeBlock (MarkedBlock::Handle *)
 
void freeOrShrinkBlock (MarkedBlock::Handle *)
 
void didAddBlock (MarkedBlock::Handle *)
 
void didConsumeFreeList (MarkedBlock::Handle *)
 
void didAllocateInBlock (MarkedBlock::Handle *)
 
void beginMarking ()
 
void endMarking ()
 
void snapshotUnswept ()
 
void clearNewlyAllocated ()
 
void sweep ()
 
void sweepLargeAllocations ()
 
void assertNoUnswept ()
 
size_t objectCount ()
 
size_t size ()
 
size_t capacity ()
 
bool isPagedOut (double deadline)
 
HeapVersion markingVersion () const
 
HeapVersion newlyAllocatedVersion () const
 
const Vector< LargeAllocation * > & largeAllocations () const
 
unsigned largeAllocationsNurseryOffset () const
 
unsigned largeAllocationsOffsetForThisCollection () const
 
LargeAllocation ** largeAllocationsForThisCollectionBegin () const
 
LargeAllocation ** largeAllocationsForThisCollectionEnd () const
 
unsigned largeAllocationsForThisCollectionSize () const
 
MarkedAllocatorfirstAllocator () const
 
MarkedAllocatorallocatorForEmptyAllocation () const
 
MarkedBlock::HandlefindEmptyBlockToSteal ()
 
Lock & allocatorLock ()
 
MarkedAllocatoraddMarkedAllocator (const AbstractLocker &, Subspace *, size_t cellSize)
 
bool isMarking () const
 
void dumpBits (PrintStream &=WTF::dataFile())
 
 MarkedSpace (Heap *)
 
 ~MarkedSpace ()
 
Heapheap () const
 
void lastChanceToFinalize ()
 
void prepareForAllocation ()
 
void visitWeakSets (SlotVisitor &)
 
void reapWeakSets ()
 
MarkedBlockSetblocks ()
 
void willStartIterating ()
 
bool isIterating () const
 
void didFinishIterating ()
 
void stopAllocating ()
 
void resumeAllocating ()
 
void prepareForMarking ()
 
void prepareForConservativeScan ()
 
template<typename Functor >
void forEachLiveCell (HeapIterationScope &, const Functor &)
 
template<typename Functor >
void forEachDeadCell (HeapIterationScope &, const Functor &)
 
template<typename Functor >
void forEachBlock (const Functor &)
 
void shrink ()
 
void freeBlock (MarkedBlock::Handle *)
 
void freeOrShrinkBlock (MarkedBlock::Handle *)
 
void didAddBlock (MarkedBlock::Handle *)
 
void didConsumeFreeList (MarkedBlock::Handle *)
 
void didAllocateInBlock (MarkedBlock::Handle *)
 
void beginMarking ()
 
void endMarking ()
 
void snapshotUnswept ()
 
void clearNewlyAllocated ()
 
void sweep ()
 
void sweepLargeAllocations ()
 
void assertNoUnswept ()
 
size_t objectCount ()
 
size_t size ()
 
size_t capacity ()
 
bool isPagedOut (double deadline)
 
HeapVersion markingVersion () const
 
HeapVersion newlyAllocatedVersion () const
 
const Vector< LargeAllocation * > & largeAllocations () const
 
unsigned largeAllocationsNurseryOffset () const
 
unsigned largeAllocationsOffsetForThisCollection () const
 
LargeAllocation ** largeAllocationsForThisCollectionBegin () const
 
LargeAllocation ** largeAllocationsForThisCollectionEnd () const
 
unsigned largeAllocationsForThisCollectionSize () const
 
MarkedAllocatorfirstAllocator () const
 
MarkedAllocatorallocatorForEmptyAllocation () const
 
MarkedBlock::HandlefindEmptyBlockToSteal ()
 
Lock & allocatorLock ()
 
MarkedAllocatoraddMarkedAllocator (const AbstractLocker &, Subspace *, size_t cellSize)
 
bool isMarking () const
 
void dumpBits (PrintStream &=WTF::dataFile())
 

Static Public Member Functions

static HeapVersion nextVersion (HeapVersion version)
 
static size_t sizeClassToIndex (size_t size)
 
static size_t indexToSizeClass (size_t index)
 
static size_t optimalSizeFor (size_t)
 
static HeapVersion nextVersion (HeapVersion version)
 
static size_t sizeClassToIndex (size_t size)
 
static size_t indexToSizeClass (size_t index)
 
static size_t optimalSizeFor (size_t)
 

Static Public Attributes

static const size_t sizeStep = MarkedBlock::atomSize
 
static const size_t preciseCutoff = 80
 
static const size_t blockPayload = (MarkedBlock::blockSize - sizeof(MarkedBlock)) & ~(MarkedBlock::atomSize - 1)
 
static const size_t largeCutoff = (blockPayload / 2) & ~(sizeStep - 1)
 
static const size_t numSizeClasses = largeCutoff / sizeStep
 
static const HeapVersion nullVersion = 0
 
static const HeapVersion initialVersion = 2
 
static JS_EXPORT_PRIVATE std::array< size_t, numSizeClassess_sizeClassForSizeStep
 

Friends

class LLIntOffsetsExtractor
 
class JIT
 
class WeakSet
 
class Subspace
 

Member Typedef Documentation

◆ BlockIterator [1/2]

◆ BlockIterator [2/2]

Constructor & Destructor Documentation

◆ MarkedSpace() [1/2]

JSC::MarkedSpace::MarkedSpace ( Heap heap)

◆ ~MarkedSpace() [1/2]

JSC::MarkedSpace::~MarkedSpace ( )

◆ MarkedSpace() [2/2]

JSC::MarkedSpace::MarkedSpace ( Heap )

◆ ~MarkedSpace() [2/2]

JSC::MarkedSpace::~MarkedSpace ( )

Member Function Documentation

◆ addMarkedAllocator() [1/2]

MarkedAllocator * JSC::MarkedSpace::addMarkedAllocator ( const AbstractLocker &  ,
Subspace subspace,
size_t  cellSize 
)

◆ addMarkedAllocator() [2/2]

MarkedAllocator* JSC::MarkedSpace::addMarkedAllocator ( const AbstractLocker &  ,
Subspace ,
size_t  cellSize 
)

◆ allocatorForEmptyAllocation() [1/2]

MarkedAllocator* JSC::MarkedSpace::allocatorForEmptyAllocation ( ) const
inline

◆ allocatorForEmptyAllocation() [2/2]

MarkedAllocator* JSC::MarkedSpace::allocatorForEmptyAllocation ( ) const
inline

◆ allocatorLock() [1/2]

Lock& JSC::MarkedSpace::allocatorLock ( )
inline

◆ allocatorLock() [2/2]

Lock& JSC::MarkedSpace::allocatorLock ( )
inline

◆ assertNoUnswept() [1/2]

void JSC::MarkedSpace::assertNoUnswept ( )

◆ assertNoUnswept() [2/2]

void JSC::MarkedSpace::assertNoUnswept ( )

◆ beginMarking() [1/2]

void JSC::MarkedSpace::beginMarking ( )

◆ beginMarking() [2/2]

void JSC::MarkedSpace::beginMarking ( )

◆ blocks() [1/2]

MarkedBlockSet& JSC::MarkedSpace::blocks ( )
inline

◆ blocks() [2/2]

MarkedBlockSet& JSC::MarkedSpace::blocks ( )
inline

◆ capacity() [1/2]

size_t JSC::MarkedSpace::capacity ( )

◆ capacity() [2/2]

size_t JSC::MarkedSpace::capacity ( )

◆ clearNewlyAllocated() [1/2]

void JSC::MarkedSpace::clearNewlyAllocated ( )

◆ clearNewlyAllocated() [2/2]

void JSC::MarkedSpace::clearNewlyAllocated ( )

◆ didAddBlock() [1/2]

void JSC::MarkedSpace::didAddBlock ( MarkedBlock::Handle )

◆ didAddBlock() [2/2]

void JSC::MarkedSpace::didAddBlock ( MarkedBlock::Handle block)

◆ didAllocateInBlock() [1/2]

void JSC::MarkedSpace::didAllocateInBlock ( MarkedBlock::Handle )

◆ didAllocateInBlock() [2/2]

void JSC::MarkedSpace::didAllocateInBlock ( MarkedBlock::Handle block)

◆ didConsumeFreeList() [1/2]

void JSC::MarkedSpace::didConsumeFreeList ( MarkedBlock::Handle )

◆ didConsumeFreeList() [2/2]

void JSC::MarkedSpace::didConsumeFreeList ( MarkedBlock::Handle )

◆ didFinishIterating() [1/2]

void JSC::MarkedSpace::didFinishIterating ( )

◆ didFinishIterating() [2/2]

void JSC::MarkedSpace::didFinishIterating ( )

◆ dumpBits() [1/2]

void JSC::MarkedSpace::dumpBits ( PrintStream &  out = WTF::dataFile())

◆ dumpBits() [2/2]

void JSC::MarkedSpace::dumpBits ( PrintStream &  = WTF::dataFile())

◆ endMarking() [1/2]

void JSC::MarkedSpace::endMarking ( )

◆ endMarking() [2/2]

void JSC::MarkedSpace::endMarking ( )

◆ findEmptyBlockToSteal() [1/2]

MarkedBlock::Handle * JSC::MarkedSpace::findEmptyBlockToSteal ( )

◆ findEmptyBlockToSteal() [2/2]

MarkedBlock::Handle* JSC::MarkedSpace::findEmptyBlockToSteal ( )

◆ firstAllocator() [1/2]

MarkedAllocator* JSC::MarkedSpace::firstAllocator ( ) const
inline

◆ firstAllocator() [2/2]

MarkedAllocator* JSC::MarkedSpace::firstAllocator ( ) const
inline

◆ forEachBlock() [1/2]

template<typename Functor >
void JSC::MarkedSpace::forEachBlock ( const Functor &  )

◆ forEachBlock() [2/2]

template<typename Functor >
void JSC::MarkedSpace::forEachBlock ( const Functor &  functor)
inline

◆ forEachDeadCell() [1/2]

template<typename Functor >
void JSC::MarkedSpace::forEachDeadCell ( HeapIterationScope ,
const Functor &   
)

◆ forEachDeadCell() [2/2]

template<typename Functor >
void JSC::MarkedSpace::forEachDeadCell ( HeapIterationScope ,
const Functor &  functor 
)
inline

◆ forEachLiveCell() [1/2]

template<typename Functor >
void JSC::MarkedSpace::forEachLiveCell ( HeapIterationScope ,
const Functor &  functor 
)
inline

◆ forEachLiveCell() [2/2]

template<typename Functor >
void JSC::MarkedSpace::forEachLiveCell ( HeapIterationScope ,
const Functor &   
)

◆ freeBlock() [1/2]

void JSC::MarkedSpace::freeBlock ( MarkedBlock::Handle )

◆ freeBlock() [2/2]

void JSC::MarkedSpace::freeBlock ( MarkedBlock::Handle block)

◆ freeOrShrinkBlock() [1/2]

void JSC::MarkedSpace::freeOrShrinkBlock ( MarkedBlock::Handle )

◆ freeOrShrinkBlock() [2/2]

void JSC::MarkedSpace::freeOrShrinkBlock ( MarkedBlock::Handle block)

◆ heap() [1/2]

Heap* JSC::MarkedSpace::heap ( ) const
inline

◆ heap() [2/2]

Heap* JSC::MarkedSpace::heap ( ) const
inline

◆ indexToSizeClass() [1/2]

static size_t JSC::MarkedSpace::indexToSizeClass ( size_t  index)
inlinestatic

◆ indexToSizeClass() [2/2]

static size_t JSC::MarkedSpace::indexToSizeClass ( size_t  index)
inlinestatic

◆ isIterating() [1/2]

bool JSC::MarkedSpace::isIterating ( ) const
inline

◆ isIterating() [2/2]

bool JSC::MarkedSpace::isIterating ( ) const
inline

◆ isMarking() [1/2]

bool JSC::MarkedSpace::isMarking ( ) const
inline

◆ isMarking() [2/2]

bool JSC::MarkedSpace::isMarking ( ) const
inline

◆ isPagedOut() [1/2]

bool JSC::MarkedSpace::isPagedOut ( double  deadline)

◆ isPagedOut() [2/2]

bool JSC::MarkedSpace::isPagedOut ( double  deadline)

◆ largeAllocations() [1/2]

const Vector<LargeAllocation*>& JSC::MarkedSpace::largeAllocations ( ) const
inline

◆ largeAllocations() [2/2]

const Vector<LargeAllocation*>& JSC::MarkedSpace::largeAllocations ( ) const
inline

◆ largeAllocationsForThisCollectionBegin() [1/2]

LargeAllocation** JSC::MarkedSpace::largeAllocationsForThisCollectionBegin ( ) const
inline

◆ largeAllocationsForThisCollectionBegin() [2/2]

LargeAllocation** JSC::MarkedSpace::largeAllocationsForThisCollectionBegin ( ) const
inline

◆ largeAllocationsForThisCollectionEnd() [1/2]

LargeAllocation** JSC::MarkedSpace::largeAllocationsForThisCollectionEnd ( ) const
inline

◆ largeAllocationsForThisCollectionEnd() [2/2]

LargeAllocation** JSC::MarkedSpace::largeAllocationsForThisCollectionEnd ( ) const
inline

◆ largeAllocationsForThisCollectionSize() [1/2]

unsigned JSC::MarkedSpace::largeAllocationsForThisCollectionSize ( ) const
inline

◆ largeAllocationsForThisCollectionSize() [2/2]

unsigned JSC::MarkedSpace::largeAllocationsForThisCollectionSize ( ) const
inline

◆ largeAllocationsNurseryOffset() [1/2]

unsigned JSC::MarkedSpace::largeAllocationsNurseryOffset ( ) const
inline

◆ largeAllocationsNurseryOffset() [2/2]

unsigned JSC::MarkedSpace::largeAllocationsNurseryOffset ( ) const
inline

◆ largeAllocationsOffsetForThisCollection() [1/2]

unsigned JSC::MarkedSpace::largeAllocationsOffsetForThisCollection ( ) const
inline

◆ largeAllocationsOffsetForThisCollection() [2/2]

unsigned JSC::MarkedSpace::largeAllocationsOffsetForThisCollection ( ) const
inline

◆ lastChanceToFinalize() [1/2]

void JSC::MarkedSpace::lastChanceToFinalize ( )

◆ lastChanceToFinalize() [2/2]

void JSC::MarkedSpace::lastChanceToFinalize ( )

◆ markingVersion() [1/2]

HeapVersion JSC::MarkedSpace::markingVersion ( ) const
inline

◆ markingVersion() [2/2]

HeapVersion JSC::MarkedSpace::markingVersion ( ) const
inline

◆ newlyAllocatedVersion() [1/2]

HeapVersion JSC::MarkedSpace::newlyAllocatedVersion ( ) const
inline

◆ newlyAllocatedVersion() [2/2]

HeapVersion JSC::MarkedSpace::newlyAllocatedVersion ( ) const
inline

◆ nextVersion() [1/2]

static HeapVersion JSC::MarkedSpace::nextVersion ( HeapVersion  version)
inlinestatic

◆ nextVersion() [2/2]

static HeapVersion JSC::MarkedSpace::nextVersion ( HeapVersion  version)
inlinestatic

◆ objectCount() [1/2]

size_t JSC::MarkedSpace::objectCount ( )

◆ objectCount() [2/2]

size_t JSC::MarkedSpace::objectCount ( )

◆ optimalSizeFor() [1/2]

ALWAYS_INLINE size_t JSC::MarkedSpace::optimalSizeFor ( size_t  bytes)
static

◆ optimalSizeFor() [2/2]

static size_t JSC::MarkedSpace::optimalSizeFor ( size_t  )
static

◆ prepareForAllocation() [1/2]

void JSC::MarkedSpace::prepareForAllocation ( )

◆ prepareForAllocation() [2/2]

void JSC::MarkedSpace::prepareForAllocation ( )

◆ prepareForConservativeScan() [1/2]

void JSC::MarkedSpace::prepareForConservativeScan ( )

◆ prepareForConservativeScan() [2/2]

void JSC::MarkedSpace::prepareForConservativeScan ( )

◆ prepareForMarking() [1/2]

void JSC::MarkedSpace::prepareForMarking ( )

◆ prepareForMarking() [2/2]

void JSC::MarkedSpace::prepareForMarking ( )

◆ reapWeakSets() [1/2]

void JSC::MarkedSpace::reapWeakSets ( )

◆ reapWeakSets() [2/2]

void JSC::MarkedSpace::reapWeakSets ( )

◆ resumeAllocating() [1/2]

void JSC::MarkedSpace::resumeAllocating ( )

◆ resumeAllocating() [2/2]

void JSC::MarkedSpace::resumeAllocating ( )

◆ shrink() [1/2]

void JSC::MarkedSpace::shrink ( )

◆ shrink() [2/2]

void JSC::MarkedSpace::shrink ( )

◆ size() [1/2]

size_t JSC::MarkedSpace::size ( )

◆ size() [2/2]

size_t JSC::MarkedSpace::size ( )

◆ sizeClassToIndex() [1/2]

static size_t JSC::MarkedSpace::sizeClassToIndex ( size_t  size)
inlinestatic

◆ sizeClassToIndex() [2/2]

static size_t JSC::MarkedSpace::sizeClassToIndex ( size_t  size)
inlinestatic

◆ snapshotUnswept() [1/2]

void JSC::MarkedSpace::snapshotUnswept ( )

◆ snapshotUnswept() [2/2]

void JSC::MarkedSpace::snapshotUnswept ( )

◆ stopAllocating() [1/2]

void JSC::MarkedSpace::stopAllocating ( )

◆ stopAllocating() [2/2]

void JSC::MarkedSpace::stopAllocating ( )

◆ sweep() [1/2]

void JSC::MarkedSpace::sweep ( )

◆ sweep() [2/2]

void JSC::MarkedSpace::sweep ( )

◆ sweepLargeAllocations() [1/2]

void JSC::MarkedSpace::sweepLargeAllocations ( )

◆ sweepLargeAllocations() [2/2]

void JSC::MarkedSpace::sweepLargeAllocations ( )

◆ visitWeakSets() [1/2]

void JSC::MarkedSpace::visitWeakSets ( SlotVisitor )

◆ visitWeakSets() [2/2]

void JSC::MarkedSpace::visitWeakSets ( SlotVisitor visitor)

◆ willStartIterating() [1/2]

void JSC::MarkedSpace::willStartIterating ( )

◆ willStartIterating() [2/2]

void JSC::MarkedSpace::willStartIterating ( )

Friends And Related Function Documentation

◆ JIT

JIT
friend

◆ LLIntOffsetsExtractor

◆ Subspace

Subspace
friend

◆ WeakSet

WeakSet
friend

Member Data Documentation

◆ blockPayload

static const size_t JSC::MarkedSpace::blockPayload = (MarkedBlock::blockSize - sizeof(MarkedBlock)) & ~(MarkedBlock::atomSize - 1)
static

◆ initialVersion

static const HeapVersion JSC::MarkedSpace::initialVersion = 2
static

◆ largeCutoff

static const size_t JSC::MarkedSpace::largeCutoff = (blockPayload / 2) & ~(sizeStep - 1)
static

◆ nullVersion

static const HeapVersion JSC::MarkedSpace::nullVersion = 0
static

◆ numSizeClasses

static const size_t JSC::MarkedSpace::numSizeClasses = largeCutoff / sizeStep
static

◆ preciseCutoff

static const size_t JSC::MarkedSpace::preciseCutoff = 80
static

◆ s_sizeClassForSizeStep

static JS_EXPORT_PRIVATE std::array< size_t, numSizeClasses > JSC::MarkedSpace::s_sizeClassForSizeStep
static

◆ sizeStep

static const size_t JSC::MarkedSpace::sizeStep = MarkedBlock::atomSize
static

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