V8 Project
v8::CpuProfileNode Class Reference

CpuProfileNode represents a node in a call graph. More...

#include <v8-profiler.h>

+ Collaboration diagram for v8::CpuProfileNode:

Public Member Functions

Handle< StringGetFunctionName () const
 Returns function name (empty string for anonymous functions.) More...
 
int GetScriptId () const
 Returns id of the script where function is located. More...
 
Handle< StringGetScriptResourceName () const
 Returns resource name for script from where the function originates. More...
 
int GetLineNumber () const
 Returns the number, 1-based, of the line where the function originates. More...
 
int GetColumnNumber () const
 Returns 1-based number of the column where the function originates. More...
 
const char * GetBailoutReason () const
 Returns bailout reason for the function if the optimization was disabled for it. More...
 
unsigned GetHitCount () const
 Returns the count of samples where the function was currently executing. More...
 
unsigned GetCallUid () const
 Returns function entry UID. More...
 
unsigned GetNodeId () const
 Returns id of the node. More...
 
int GetChildrenCount () const
 Returns child nodes count of the node. More...
 
const CpuProfileNodeGetChild (int index) const
 Retrieves a child node by index. More...
 

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 23 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 7085 of file api.cc.

7085  {
7086  const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7087  return node->entry()->bailout_reason();
7088 }
const char * bailout_reason() const
CodeEntry * entry() const

References v8::internal::CodeEntry::bailout_reason(), and v8::internal::ProfileNode::entry().

+ Here is the call graph for this function:

◆ GetCallUid()

unsigned v8::CpuProfileNode::GetCallUid ( ) const

Returns function entry UID.

Definition at line 7096 of file api.cc.

7096  {
7097  return reinterpret_cast<const i::ProfileNode*>(this)->entry()->GetCallUid();
7098 }

◆ GetChild()

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

Retrieves a child node by index.

Definition at line 7111 of file api.cc.

7111  {
7112  const i::ProfileNode* child =
7113  reinterpret_cast<const i::ProfileNode*>(this)->children()->at(index);
7114  return reinterpret_cast<const CpuProfileNode*>(child);
7115 }

◆ GetChildrenCount()

int v8::CpuProfileNode::GetChildrenCount ( ) const

Returns child nodes count of the node.

Definition at line 7106 of file api.cc.

7106  {
7107  return reinterpret_cast<const i::ProfileNode*>(this)->children()->length();
7108 }

◆ 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 7079 of file api.cc.

7079  {
7080  return reinterpret_cast<const i::ProfileNode*>(this)->
7081  entry()->column_number();
7082 }

◆ GetFunctionName()

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

Returns function name (empty string for anonymous functions.)

Definition at line 7041 of file api.cc.

7041  {
7042  i::Isolate* isolate = i::Isolate::Current();
7043  const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7044  const i::CodeEntry* entry = node->entry();
7046  isolate->factory()->InternalizeUtf8String(entry->name());
7047  if (!entry->has_name_prefix()) {
7048  return ToApiHandle<String>(name);
7049  } else {
7050  // We do not expect this to fail. Change this if it does.
7051  i::Handle<i::String> cons = isolate->factory()->NewConsString(
7052  isolate->factory()->InternalizeUtf8String(entry->name_prefix()),
7053  name).ToHandleChecked();
7054  return ToApiHandle<String>(cons);
7055  }
7056 }
const char * name_prefix() const
const char * name() const
Factory * factory()
Definition: isolate.h:982
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name

References v8::internal::ProfileNode::entry(), v8::internal::Isolate::factory(), v8::internal::CodeEntry::has_name_prefix(), name, v8::internal::CodeEntry::name(), and v8::internal::CodeEntry::name_prefix().

+ 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 7091 of file api.cc.

7091  {
7092  return reinterpret_cast<const i::ProfileNode*>(this)->self_ticks();
7093 }

◆ 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 7074 of file api.cc.

7074  {
7075  return reinterpret_cast<const i::ProfileNode*>(this)->entry()->line_number();
7076 }

◆ GetNodeId()

unsigned v8::CpuProfileNode::GetNodeId ( ) const

Returns id of the node.

The id is unique within the tree

Definition at line 7101 of file api.cc.

7101  {
7102  return reinterpret_cast<const i::ProfileNode*>(this)->id();
7103 }

◆ GetScriptId()

int v8::CpuProfileNode::GetScriptId ( ) const

Returns id of the script where function is located.

Definition at line 7059 of file api.cc.

7059  {
7060  const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7061  const i::CodeEntry* entry = node->entry();
7062  return entry->script_id();
7063 }

References v8::internal::ProfileNode::entry(), and v8::internal::CodeEntry::script_id().

+ Here is the call graph for this function:

◆ GetScriptResourceName()

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

Returns resource name for script from where the function originates.

Definition at line 7066 of file api.cc.

7066  {
7067  i::Isolate* isolate = i::Isolate::Current();
7068  const i::ProfileNode* node = reinterpret_cast<const i::ProfileNode*>(this);
7069  return ToApiHandle<String>(isolate->factory()->InternalizeUtf8String(
7070  node->entry()->resource_name()));
7071 }
const char * resource_name() const

References v8::internal::ProfileNode::entry(), v8::internal::Isolate::factory(), and v8::internal::CodeEntry::resource_name().

+ Here is the call graph for this function:

Member Data Documentation

◆ kNoColumnNumberInfo

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

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

◆ kNoLineNumberInfo

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

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


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