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

#include <sampling-heap-profiler.h>

Collaboration diagram for v8::internal::SamplingHeapProfiler:

Classes

class  AllocationNode
 
class  Observer
 
struct  Sample
 

Public Member Functions

 SamplingHeapProfiler (Heap *heap, StringsStorage *names, uint64_t rate, int stack_depth, v8::HeapProfiler::SamplingFlags flags)
 
 ~SamplingHeapProfiler ()
 
 SamplingHeapProfiler (const SamplingHeapProfiler &)=delete
 
SamplingHeapProfileroperator= (const SamplingHeapProfiler &)=delete
 
v8::AllocationProfileGetAllocationProfile ()
 
StringsStoragenames () const
 

Private Member Functions

void SampleObject (Address soon_object, size_t size)
 
const std::vector< v8::AllocationProfile::SampleBuildSamples () const
 
AllocationNodeFindOrAddChildNode (AllocationNode *parent, const char *name, int script_id, int start_position)
 
uint32_t next_node_id ()
 
uint64_t next_sample_id ()
 
v8::AllocationProfile::NodeTranslateAllocationNode (AllocationProfile *profile, SamplingHeapProfiler::AllocationNode *node, const std::map< int, Handle< Script > > &scripts)
 
v8::AllocationProfile::Allocation ScaleSample (size_t size, unsigned int count) const
 
AllocationNodeAddStack ()
 

Static Private Member Functions

static void OnWeakCallback (const WeakCallbackInfo< Sample > &data)
 

Private Attributes

Isolate *const isolate_
 
Heap *const heap_
 
uint64_t last_sample_id_ = 0
 
uint32_t last_node_id_ = 0
 
Observer allocation_observer_
 
StringsStorage *const names_
 
AllocationNode profile_root_
 
std::unordered_map< Sample *, std::unique_ptr< Sample > > samples_
 
const int stack_depth_
 
const uint64_t rate_
 
v8::HeapProfiler::SamplingFlags flags_
 

Detailed Description

Definition at line 46 of file sampling-heap-profiler.h.

Constructor & Destructor Documentation

◆ SamplingHeapProfiler() [1/2]

v8::internal::SamplingHeapProfiler::SamplingHeapProfiler ( Heap * heap,
StringsStorage * names,
uint64_t rate,
int stack_depth,
v8::HeapProfiler::SamplingFlags flags )

Definition at line 53 of file sampling-heap-profiler.cc.

Here is the call graph for this function:

◆ ~SamplingHeapProfiler()

v8::internal::SamplingHeapProfiler::~SamplingHeapProfiler ( )

Definition at line 71 of file sampling-heap-profiler.cc.

Here is the call graph for this function:

◆ SamplingHeapProfiler() [2/2]

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

Member Function Documentation

◆ AddStack()

SamplingHeapProfiler::AllocationNode * v8::internal::SamplingHeapProfiler::AddStack ( )
private

Definition at line 153 of file sampling-heap-profiler.cc.

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

◆ BuildSamples()

const std::vector< v8::AllocationProfile::Sample > v8::internal::SamplingHeapProfiler::BuildSamples ( ) const
private

Definition at line 307 of file sampling-heap-profiler.cc.

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

◆ FindOrAddChildNode()

SamplingHeapProfiler::AllocationNode * v8::internal::SamplingHeapProfiler::FindOrAddChildNode ( AllocationNode * parent,
const char * name,
int script_id,
int start_position )
private

Definition at line 138 of file sampling-heap-profiler.cc.

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

◆ GetAllocationProfile()

v8::AllocationProfile * v8::internal::SamplingHeapProfiler::GetAllocationProfile ( )

Definition at line 284 of file sampling-heap-profiler.cc.

Here is the call graph for this function:

◆ names()

StringsStorage * v8::internal::SamplingHeapProfiler::names ( ) const
inline

Definition at line 126 of file sampling-heap-profiler.h.

Here is the caller graph for this function:

◆ next_node_id()

uint32_t v8::internal::SamplingHeapProfiler::next_node_id ( )
inlineprivate

Definition at line 169 of file sampling-heap-profiler.h.

Here is the caller graph for this function:

◆ next_sample_id()

uint64_t v8::internal::SamplingHeapProfiler::next_sample_id ( )
inlineprivate

Definition at line 170 of file sampling-heap-profiler.h.

Here is the caller graph for this function:

◆ OnWeakCallback()

void v8::internal::SamplingHeapProfiler::OnWeakCallback ( const WeakCallbackInfo< Sample > & data)
staticprivate

Definition at line 104 of file sampling-heap-profiler.cc.

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

◆ operator=()

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

◆ SampleObject()

void v8::internal::SamplingHeapProfiler::SampleObject ( Address soon_object,
size_t size )
private

Definition at line 76 of file sampling-heap-profiler.cc.

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

◆ ScaleSample()

v8::AllocationProfile::Allocation v8::internal::SamplingHeapProfiler::ScaleSample ( size_t size,
unsigned int count ) const
private

Definition at line 46 of file sampling-heap-profiler.cc.

Here is the caller graph for this function:

◆ TranslateAllocationNode()

v8::AllocationProfile::Node * v8::internal::SamplingHeapProfiler::TranslateAllocationNode ( AllocationProfile * profile,
SamplingHeapProfiler::AllocationNode * node,
const std::map< int, Handle< Script > > & scripts )
private

Definition at line 235 of file sampling-heap-profiler.cc.

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

Member Data Documentation

◆ allocation_observer_

Observer v8::internal::SamplingHeapProfiler::allocation_observer_
private

Definition at line 190 of file sampling-heap-profiler.h.

◆ flags_

v8::HeapProfiler::SamplingFlags v8::internal::SamplingHeapProfiler::flags_
private

Definition at line 196 of file sampling-heap-profiler.h.

◆ heap_

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

Definition at line 187 of file sampling-heap-profiler.h.

◆ isolate_

Isolate* const v8::internal::SamplingHeapProfiler::isolate_
private

Definition at line 186 of file sampling-heap-profiler.h.

◆ last_node_id_

uint32_t v8::internal::SamplingHeapProfiler::last_node_id_ = 0
private

Definition at line 189 of file sampling-heap-profiler.h.

◆ last_sample_id_

uint64_t v8::internal::SamplingHeapProfiler::last_sample_id_ = 0
private

Definition at line 188 of file sampling-heap-profiler.h.

◆ names_

StringsStorage* const v8::internal::SamplingHeapProfiler::names_
private

Definition at line 191 of file sampling-heap-profiler.h.

◆ profile_root_

AllocationNode v8::internal::SamplingHeapProfiler::profile_root_
private

Definition at line 192 of file sampling-heap-profiler.h.

◆ rate_

const uint64_t v8::internal::SamplingHeapProfiler::rate_
private

Definition at line 195 of file sampling-heap-profiler.h.

◆ samples_

std::unordered_map<Sample*, std::unique_ptr<Sample> > v8::internal::SamplingHeapProfiler::samples_
private

Definition at line 193 of file sampling-heap-profiler.h.

◆ stack_depth_

const int v8::internal::SamplingHeapProfiler::stack_depth_
private

Definition at line 194 of file sampling-heap-profiler.h.


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