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

#include <v8-profiler.h>

Collaboration diagram for v8::CpuProfile:

Public Types

enum  SerializationFormat { kJSON = 0 }
 

Public Member Functions

Local< StringGetTitle () const
 
const CpuProfileNodeGetTopDownRoot () const
 
int GetSamplesCount () const
 
const CpuProfileNodeGetSample (int index) const
 
int64_t GetSampleTimestamp (int index) const
 
int64_t GetStartTime () const
 
StateTag GetSampleState (int index) const
 
EmbedderStateTag GetSampleEmbedderState (int index) const
 
int64_t GetEndTime () const
 
void Delete ()
 
void Serialize (OutputStream *stream, SerializationFormat format=kJSON) const
 

Detailed Description

CpuProfile contains a CPU profile in a form of top-down call tree (from main() down to functions that do all the work).

Definition at line 210 of file v8-profiler.h.

Member Enumeration Documentation

◆ SerializationFormat

Enumerator
kJSON 

Definition at line 212 of file v8-profiler.h.

Member Function Documentation

◆ Delete()

void v8::CpuProfile::Delete ( )

Deletes the profile and removes it from CpuProfiler's list. All pointers to nodes previously returned become invalid.

Definition at line 11320 of file api.cc.

Here is the caller graph for this function:

◆ GetEndTime()

int64_t v8::CpuProfile::GetEndTime ( ) const

Returns time when the profile recording was stopped (in microseconds) since some unspecified starting point. The point is equal to the starting point used by GetStartTime.

Definition at line 11367 of file api.cc.

Here is the call graph for this function:

◆ GetSample()

const CpuProfileNode * v8::CpuProfile::GetSample ( int index) const

Returns profile node corresponding to the top frame the sample at the given index.

Definition at line 11339 of file api.cc.

◆ GetSampleEmbedderState()

EmbedderStateTag v8::CpuProfile::GetSampleEmbedderState ( int index) const

Returns state of the embedder when sample was captured.

Definition at line 11357 of file api.cc.

Here is the call graph for this function:

◆ GetSamplesCount()

int v8::CpuProfile::GetSamplesCount ( ) const

Returns number of samples recorded. The samples are not recorded unless |record_samples| parameter of CpuProfiler::StartCpuProfiling is true.

Definition at line 11387 of file api.cc.

◆ GetSampleState()

StateTag v8::CpuProfile::GetSampleState ( int index) const

Returns state of the vm when sample was captured.

Definition at line 11352 of file api.cc.

Here is the call graph for this function:

◆ GetSampleTimestamp()

int64_t v8::CpuProfile::GetSampleTimestamp ( int index) const

Returns the timestamp of the sample. The timestamp is the number of microseconds since some unspecified starting point. The point is equal to the starting point used by GetStartTime.

Definition at line 11347 of file api.cc.

Here is the call graph for this function:

◆ GetStartTime()

int64_t v8::CpuProfile::GetStartTime ( ) const

Returns time when the profile recording was started (in microseconds) since some unspecified starting point.

Definition at line 11362 of file api.cc.

Here is the call graph for this function:

◆ GetTitle()

Local< String > v8::CpuProfile::GetTitle ( ) const

Returns CPU profile title.

Definition at line 11327 of file api.cc.

Here is the call graph for this function:

◆ GetTopDownRoot()

const CpuProfileNode * v8::CpuProfile::GetTopDownRoot ( ) const

Returns the root node of the top down call tree.

Definition at line 11334 of file api.cc.

◆ Serialize()

void v8::CpuProfile::Serialize ( OutputStream * stream,
CpuProfile::SerializationFormat format = kJSON ) const

Prepare a serialized representation of the profile. The result is written into the stream provided in chunks of specified size.

For the JSON format, heap contents are represented as an object with the following structure:

{ nodes: [nodes array], startTime: number, endTime: number samples: [strings array] timeDeltas: [numbers array] }

Definition at line 11377 of file api.cc.

Here is the call graph for this function:

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