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

#include <pretenuring-handler.h>

Collaboration diagram for v8::internal::PretenuringHandler:

Public Types

enum  FindMementoMode { kForRuntime , kForGC }
 
using PretenuringFeedbackMap
 

Public Member Functions

 PretenuringHandler (Heap *heap)
 
 ~PretenuringHandler ()
 
void reset ()
 
void MergeAllocationSitePretenuringFeedback (const PretenuringFeedbackMap &local_pretenuring_feedback)
 
V8_EXPORT_PRIVATE void PretenureAllocationSiteOnNextCollection (Tagged< AllocationSite > site)
 
void ProcessPretenuringFeedback (size_t new_space_capacity_before_gc)
 
void RemoveAllocationSitePretenuringFeedback (Tagged< AllocationSite > site)
 
bool HasPretenuringFeedback () const
 

Static Public Member Functions

template<FindMementoMode mode>
static Tagged< AllocationMementoFindAllocationMemento (Heap *heap, Tagged< Map > map, Tagged< HeapObject > object)
 
template<FindMementoMode mode>
static Tagged< AllocationMementoFindAllocationMemento (Heap *heap, Tagged< Map > map, Tagged< HeapObject > object, int object_size)
 
static void UpdateAllocationSite (Heap *heap, Tagged< Map > map, Tagged< HeapObject > object, int object_size, PretenuringFeedbackMap *pretenuring_feedback)
 
static V8_EXPORT_PRIVATE int GetMinMementoCountForTesting ()
 

Static Public Attributes

static constexpr int kInitialFeedbackCapacity = 256
 

Private Attributes

Heap *const heap_
 
PretenuringFeedbackMap global_pretenuring_feedback_
 
std::unique_ptr< GlobalHandleVector< AllocationSite > > allocation_sites_to_pretenure_
 

Detailed Description

Definition at line 21 of file pretenuring-handler.h.

Member Typedef Documentation

◆ PretenuringFeedbackMap

Initial value:
std::unordered_map<Tagged<AllocationSite>, size_t, Object::Hasher>

Definition at line 25 of file pretenuring-handler.h.

Member Enumeration Documentation

◆ FindMementoMode

Enumerator
kForRuntime 
kForGC 

Definition at line 27 of file pretenuring-handler.h.

Constructor & Destructor Documentation

◆ PretenuringHandler()

v8::internal::PretenuringHandler::PretenuringHandler ( Heap * heap)
explicit

Definition at line 19 of file pretenuring-handler.cc.

◆ ~PretenuringHandler()

v8::internal::PretenuringHandler::~PretenuringHandler ( )
default

Member Function Documentation

◆ FindAllocationMemento() [1/2]

Tagged< AllocationMemento > v8::internal::PretenuringHandler::FindAllocationMemento ( Heap * heap,
Tagged< Map > map,
Tagged< HeapObject > object )
inlinestatic

Definition at line 55 of file pretenuring-handler-inl.h.

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

◆ FindAllocationMemento() [2/2]

Tagged< AllocationMemento > v8::internal::PretenuringHandler::FindAllocationMemento ( Heap * heap,
Tagged< Map > map,
Tagged< HeapObject > object,
int object_size )
inlinestatic

Definition at line 63 of file pretenuring-handler-inl.h.

Here is the call graph for this function:

◆ GetMinMementoCountForTesting()

int v8::internal::PretenuringHandler::GetMinMementoCountForTesting ( )
static

Definition at line 136 of file pretenuring-handler.cc.

◆ HasPretenuringFeedback()

bool v8::internal::PretenuringHandler::HasPretenuringFeedback ( ) const
inline

Definition at line 77 of file pretenuring-handler.h.

◆ MergeAllocationSitePretenuringFeedback()

void v8::internal::PretenuringHandler::MergeAllocationSitePretenuringFeedback ( const PretenuringFeedbackMap & local_pretenuring_feedback)

Definition at line 140 of file pretenuring-handler.cc.

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

◆ PretenureAllocationSiteOnNextCollection()

void v8::internal::PretenuringHandler::PretenureAllocationSiteOnNextCollection ( Tagged< AllocationSite > site)

Definition at line 286 of file pretenuring-handler.cc.

Here is the caller graph for this function:

◆ ProcessPretenuringFeedback()

void v8::internal::PretenuringHandler::ProcessPretenuringFeedback ( size_t new_space_capacity_before_gc)

Definition at line 171 of file pretenuring-handler.cc.

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

◆ RemoveAllocationSitePretenuringFeedback()

void v8::internal::PretenuringHandler::RemoveAllocationSitePretenuringFeedback ( Tagged< AllocationSite > site)

Definition at line 166 of file pretenuring-handler.cc.

Here is the caller graph for this function:

◆ reset()

void v8::internal::PretenuringHandler::reset ( )

Definition at line 295 of file pretenuring-handler.cc.

Here is the caller graph for this function:

◆ UpdateAllocationSite()

void v8::internal::PretenuringHandler::UpdateAllocationSite ( Heap * heap,
Tagged< Map > map,
Tagged< HeapObject > object,
int object_size,
PretenuringFeedbackMap * pretenuring_feedback )
inlinestatic

Definition at line 22 of file pretenuring-handler-inl.h.

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

Member Data Documentation

◆ allocation_sites_to_pretenure_

std::unique_ptr<GlobalHandleVector<AllocationSite> > v8::internal::PretenuringHandler::allocation_sites_to_pretenure_
private

Definition at line 94 of file pretenuring-handler.h.

◆ global_pretenuring_feedback_

PretenuringFeedbackMap v8::internal::PretenuringHandler::global_pretenuring_feedback_
private

Definition at line 91 of file pretenuring-handler.h.

◆ heap_

Heap* const v8::internal::PretenuringHandler::heap_
private

Definition at line 84 of file pretenuring-handler.h.

◆ kInitialFeedbackCapacity

int v8::internal::PretenuringHandler::kInitialFeedbackCapacity = 256
staticconstexpr

Definition at line 23 of file pretenuring-handler.h.


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