v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::FieldStatsCollector Class Reference
Inheritance diagram for v8::internal::FieldStatsCollector:
Collaboration diagram for v8::internal::FieldStatsCollector:

Classes

struct  JSObjectFieldStats
 

Public Member Functions

 FieldStatsCollector (Heap *heap, size_t *tagged_fields_count, size_t *embedder_fields_count, size_t *inobject_smi_fields_count, size_t *boxed_double_fields_count, size_t *string_data_count, size_t *raw_fields_count)
 
void RecordStats (Tagged< HeapObject > host)
 
void VisitPointers (Tagged< HeapObject > host, ObjectSlot start, ObjectSlot end) override
 
void VisitPointers (Tagged< HeapObject > host, MaybeObjectSlot start, MaybeObjectSlot end) override
 
V8_INLINE void VisitInstructionStreamPointer (Tagged< Code > host, InstructionStreamSlot slot) override
 
void VisitCodeTarget (Tagged< InstructionStream > host, RelocInfo *rinfo) override
 
void VisitEmbeddedPointer (Tagged< InstructionStream > host, RelocInfo *rinfo) override
 
void VisitMapPointer (Tagged< HeapObject > host) override
 
- Public Member Functions inherited from v8::internal::ObjectVisitorWithCageBases
 ObjectVisitorWithCageBases (PtrComprCageBase cage_base, PtrComprCageBase code_cage_base)
 
 ObjectVisitorWithCageBases (Isolate *isolate)
 
 ObjectVisitorWithCageBases (Heap *heap)
 
PtrComprCageBase cage_base () const
 
PtrComprCageBase code_cage_base () const
 
- Public Member Functions inherited from v8::internal::ObjectVisitor
virtual ~ObjectVisitor ()=default
 
virtual void VisitCustomWeakPointers (Tagged< HeapObject > host, ObjectSlot start, ObjectSlot end)
 
virtual void VisitPointer (Tagged< HeapObject > host, ObjectSlot p)
 
virtual void VisitPointer (Tagged< HeapObject > host, MaybeObjectSlot p)
 
virtual void VisitCustomWeakPointer (Tagged< HeapObject > host, ObjectSlot p)
 
virtual void VisitEphemeron (Tagged< HeapObject > host, int index, ObjectSlot key, ObjectSlot value)
 
void VisitRelocInfo (Tagged< InstructionStream > host, RelocIterator *it)
 
virtual void VisitExternalReference (Tagged< InstructionStream > host, RelocInfo *rinfo)
 
virtual void VisitInternalReference (Tagged< InstructionStream > host, RelocInfo *rinfo)
 
virtual void VisitOffHeapTarget (Tagged< InstructionStream > host, RelocInfo *rinfo)
 
virtual void VisitExternalPointer (Tagged< HeapObject > host, ExternalPointerSlot slot)
 
virtual void VisitCppHeapPointer (Tagged< HeapObject > host, CppHeapPointerSlot slot)
 
virtual void VisitIndirectPointer (Tagged< HeapObject > host, IndirectPointerSlot slot, IndirectPointerMode mode)
 
virtual void VisitProtectedPointer (Tagged< TrustedObject > host, ProtectedPointerSlot slot)
 
virtual void VisitProtectedPointer (Tagged< TrustedObject > host, ProtectedMaybeObjectSlot slot)
 
virtual void VisitTrustedPointerTableEntry (Tagged< HeapObject > host, IndirectPointerSlot slot)
 
virtual void VisitJSDispatchTableEntry (Tagged< HeapObject > host, JSDispatchHandle handle)
 

Private Member Functions

JSObjectFieldStats GetInobjectFieldStats (Tagged< Map > map)
 

Private Attributes

std::unordered_map< Tagged< Map >, JSObjectFieldStats, Object::Hasherfield_stats_cache_
 
Heap *const heap_
 
size_t *const tagged_fields_count_
 
size_t *const embedder_fields_count_
 
size_t *const inobject_smi_fields_count_
 
size_t *const boxed_double_fields_count_
 
size_t *const string_data_count_
 
size_t *const raw_fields_count_
 

Detailed Description

Definition at line 41 of file object-stats.cc.

Constructor & Destructor Documentation

◆ FieldStatsCollector()

v8::internal::FieldStatsCollector::FieldStatsCollector ( Heap * heap,
size_t * tagged_fields_count,
size_t * embedder_fields_count,
size_t * inobject_smi_fields_count,
size_t * boxed_double_fields_count,
size_t * string_data_count,
size_t * raw_fields_count )
inline

Definition at line 43 of file object-stats.cc.

Member Function Documentation

◆ GetInobjectFieldStats()

FieldStatsCollector::JSObjectFieldStats v8::internal::FieldStatsCollector::GetInobjectFieldStats ( Tagged< Map > map)
private

Definition at line 147 of file object-stats.cc.

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

◆ RecordStats()

void v8::internal::FieldStatsCollector::RecordStats ( Tagged< HeapObject > host)
inline

Definition at line 57 of file object-stats.cc.

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

◆ VisitCodeTarget()

void v8::internal::FieldStatsCollector::VisitCodeTarget ( Tagged< InstructionStream > host,
RelocInfo * rinfo )
inlineoverridevirtual

Reimplemented from v8::internal::ObjectVisitor.

Definition at line 110 of file object-stats.cc.

◆ VisitEmbeddedPointer()

void v8::internal::FieldStatsCollector::VisitEmbeddedPointer ( Tagged< InstructionStream > host,
RelocInfo * rinfo )
inlineoverridevirtual

Reimplemented from v8::internal::ObjectVisitor.

Definition at line 116 of file object-stats.cc.

◆ VisitInstructionStreamPointer()

V8_INLINE void v8::internal::FieldStatsCollector::VisitInstructionStreamPointer ( Tagged< Code > host,
InstructionStreamSlot slot )
inlineoverridevirtual

Implements v8::internal::ObjectVisitor.

Definition at line 105 of file object-stats.cc.

◆ VisitMapPointer()

void v8::internal::FieldStatsCollector::VisitMapPointer ( Tagged< HeapObject > host)
inlineoverridevirtual

Reimplemented from v8::internal::ObjectVisitor.

Definition at line 121 of file object-stats.cc.

◆ VisitPointers() [1/2]

void v8::internal::FieldStatsCollector::VisitPointers ( Tagged< HeapObject > host,
MaybeObjectSlot start,
MaybeObjectSlot end )
inlineoverridevirtual

Implements v8::internal::ObjectVisitor.

Definition at line 100 of file object-stats.cc.

◆ VisitPointers() [2/2]

void v8::internal::FieldStatsCollector::VisitPointers ( Tagged< HeapObject > host,
ObjectSlot start,
ObjectSlot end )
inlineoverridevirtual

Implements v8::internal::ObjectVisitor.

Definition at line 96 of file object-stats.cc.

Member Data Documentation

◆ boxed_double_fields_count_

size_t* const v8::internal::FieldStatsCollector::boxed_double_fields_count_
private

Definition at line 141 of file object-stats.cc.

◆ embedder_fields_count_

size_t* const v8::internal::FieldStatsCollector::embedder_fields_count_
private

Definition at line 139 of file object-stats.cc.

◆ field_stats_cache_

std::unordered_map<Tagged<Map>, JSObjectFieldStats, Object::Hasher> v8::internal::FieldStatsCollector::field_stats_cache_
private

Definition at line 133 of file object-stats.cc.

◆ heap_

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

Definition at line 137 of file object-stats.cc.

◆ inobject_smi_fields_count_

size_t* const v8::internal::FieldStatsCollector::inobject_smi_fields_count_
private

Definition at line 140 of file object-stats.cc.

◆ raw_fields_count_

size_t* const v8::internal::FieldStatsCollector::raw_fields_count_
private

Definition at line 143 of file object-stats.cc.

◆ string_data_count_

size_t* const v8::internal::FieldStatsCollector::string_data_count_
private

Definition at line 142 of file object-stats.cc.

◆ tagged_fields_count_

size_t* const v8::internal::FieldStatsCollector::tagged_fields_count_
private

Definition at line 138 of file object-stats.cc.


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