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

#include <v8-profiler.h>

Collaboration diagram for v8::CpuProfileNode:

Classes

struct  LineTick
 

Public Types

enum  SourceType {
  kScript = 0 , kBuiltin = 1 , kCallback = 2 , kInternal = 3 ,
  kUnresolved = 4
}
 

Public Member Functions

Local< StringGetFunctionName () const
 
const char * GetFunctionNameStr () const
 
int GetScriptId () const
 
Local< StringGetScriptResourceName () const
 
const char * GetScriptResourceNameStr () const
 
bool IsScriptSharedCrossOrigin () const
 
int GetLineNumber () const
 
int GetColumnNumber () const
 
unsigned int GetHitLineCount () const
 
bool GetLineTicks (LineTick *entries, unsigned int length) const
 
const char * GetBailoutReason () const
 
unsigned GetHitCount () const
 
unsigned GetNodeId () const
 
SourceType GetSourceType () const
 
int GetChildrenCount () const
 
const CpuProfileNodeGetChild (int index) const
 
const CpuProfileNodeGetParent () const
 
const std::vector< CpuProfileDeoptInfo > & GetDeoptInfos () const
 

Static Public Attributes

static const int kNoLineNumberInfo = Message::kNoLineNumberInfo
 
static const int kNoColumnNumberInfo = Message::kNoColumnInfo
 

Detailed Description

CpuProfileNode represents a node in a call graph.

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

Member Enumeration Documentation

◆ SourceType

Enumerator
kScript 
kBuiltin 
kCallback 
kInternal 
kUnresolved 

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

Member Function Documentation

◆ GetBailoutReason()

const char * v8::CpuProfileNode::GetBailoutReason ( ) const

Returns bailout reason for the function if the optimization was disabled for it.

Definition at line 11281 of file api.cc.

Here is the call graph for this function:

◆ GetChild()

const CpuProfileNode * v8::CpuProfileNode::GetChild ( int index) const

Retrieves a child node by index.

Definition at line 11303 of file api.cc.

◆ GetChildrenCount()

int v8::CpuProfileNode::GetChildrenCount ( ) const

Returns child nodes count of the node.

Definition at line 11298 of file api.cc.

Here is the call graph for this function:

◆ GetColumnNumber()

int v8::CpuProfileNode::GetColumnNumber ( ) const

Returns 1-based number of the column where the function originates. kNoColumnNumberInfo if no column number information is available.

Definition at line 11264 of file api.cc.

◆ GetDeoptInfos()

const std::vector< CpuProfileDeoptInfo > & v8::CpuProfileNode::GetDeoptInfos ( ) const

Retrieves deopt infos for the node.

Definition at line 11315 of file api.cc.

Here is the call graph for this function:

◆ GetFunctionName()

Local< String > v8::CpuProfileNode::GetFunctionName ( ) const

Returns function name (empty string for anonymous functions.)

Definition at line 11223 of file api.cc.

Here is the call graph for this function:

◆ GetFunctionNameStr()

const char * v8::CpuProfileNode::GetFunctionNameStr ( ) const

Returns function name (empty string for anonymous functions.) The string ownership is not passed to the caller. It stays valid until profile is deleted. The function is thread safe.

Definition at line 11232 of file api.cc.

Here is the call graph for this function:

◆ GetHitCount()

unsigned v8::CpuProfileNode::GetHitCount ( ) const

Returns the count of samples where the function was currently executing.

Definition at line 11286 of file api.cc.

◆ GetHitLineCount()

unsigned int v8::CpuProfileNode::GetHitLineCount ( ) const

Returns the number of the function's source lines that collect the samples.

Definition at line 11270 of file api.cc.

Here is the call graph for this function:

◆ GetLineNumber()

int v8::CpuProfileNode::GetLineNumber ( ) const

Returns the number, 1-based, of the line where the function originates. kNoLineNumberInfo if no line number information is available.

Definition at line 11260 of file api.cc.

◆ GetLineTicks()

bool v8::CpuProfileNode::GetLineTicks ( LineTick * entries,
unsigned int length ) const

Returns the set of source lines that collect the samples. The caller allocates buffer and responsible for releasing it. True if all available entries are copied, otherwise false. The function copies nothing if buffer is not large enough.

Definition at line 11275 of file api.cc.

Here is the call graph for this function:

◆ GetNodeId()

unsigned v8::CpuProfileNode::GetNodeId ( ) const

Returns id of the node. The id is unique within the tree

Definition at line 11290 of file api.cc.

◆ GetParent()

const CpuProfileNode * v8::CpuProfileNode::GetParent ( ) const

Retrieves the ancestor node, or null if the root.

Definition at line 11309 of file api.cc.

◆ GetScriptId()

int v8::CpuProfileNode::GetScriptId ( ) const

Returns id of the script where function is located.

Definition at line 11237 of file api.cc.

Here is the call graph for this function:

◆ GetScriptResourceName()

Local< String > v8::CpuProfileNode::GetScriptResourceName ( ) const

Returns resource name for script from where the function originates.

Definition at line 11243 of file api.cc.

Here is the call graph for this function:

◆ GetScriptResourceNameStr()

const char * v8::CpuProfileNode::GetScriptResourceNameStr ( ) const

Returns resource name for script from where the function originates. The string ownership is not passed to the caller. It stays valid until profile is deleted. The function is thread safe.

Definition at line 11250 of file api.cc.

Here is the call graph for this function:

◆ GetSourceType()

CpuProfileNode::SourceType v8::CpuProfileNode::GetSourceType ( ) const

Gets the type of the source which the node was captured from.

Definition at line 11294 of file api.cc.

◆ IsScriptSharedCrossOrigin()

bool v8::CpuProfileNode::IsScriptSharedCrossOrigin ( ) const

Return true if the script from where the function originates is flagged as being shared cross-origin.

Definition at line 11255 of file api.cc.

Here is the call graph for this function:

Member Data Documentation

◆ kNoColumnNumberInfo

const int v8::CpuProfileNode::kNoColumnNumberInfo = Message::kNoColumnInfo
static

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

◆ kNoLineNumberInfo

const int v8::CpuProfileNode::kNoLineNumberInfo = Message::kNoLineNumberInfo
static

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


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