V8 Project
v8::internal::ProfileNode Class Reference

#include <profile-generator.h>

+ Collaboration diagram for v8::internal::ProfileNode:

Public Member Functions

 ProfileNode (ProfileTree *tree, CodeEntry *entry)
 
ProfileNodeFindChild (CodeEntry *entry)
 
ProfileNodeFindOrAddChild (CodeEntry *entry)
 
void IncrementSelfTicks ()
 
void IncreaseSelfTicks (unsigned amount)
 
CodeEntryentry () const
 
unsigned self_ticks () const
 
const List< ProfileNode * > * children () const
 
unsigned id () const
 
void Print (int indent)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (ProfileNode)
 

Static Private Member Functions

static bool CodeEntriesMatch (void *entry1, void *entry2)
 
static uint32_t CodeEntryHash (CodeEntry *entry)
 

Private Attributes

ProfileTreetree_
 
CodeEntryentry_
 
unsigned self_ticks_
 
HashMap children_
 
List< ProfileNode * > children_list_
 
unsigned id_
 

Detailed Description

Definition at line 109 of file profile-generator.h.

Constructor & Destructor Documentation

◆ ProfileNode()

v8::internal::ProfileNode::ProfileNode ( ProfileTree tree,
CodeEntry entry 
)
inline

Definition at line 42 of file profile-generator-inl.h.

43  : tree_(tree),
44  entry_(entry),
45  self_ticks_(0),
47  id_(tree->next_node_id()) { }
CodeEntry * entry() const
static bool CodeEntriesMatch(void *entry1, void *entry2)

Referenced by FindOrAddChild().

+ Here is the caller graph for this function:

Member Function Documentation

◆ children()

const List<ProfileNode*>* v8::internal::ProfileNode::children ( ) const
inline

Definition at line 120 of file profile-generator.h.

120 { return &children_list_; }
List< ProfileNode * > children_list_

References children_list_.

Referenced by v8::internal::Position::INLINE().

+ Here is the caller graph for this function:

◆ CodeEntriesMatch()

static bool v8::internal::ProfileNode::CodeEntriesMatch ( void *  entry1,
void *  entry2 
)
inlinestaticprivate

Definition at line 126 of file profile-generator.h.

126  {
127  return reinterpret_cast<CodeEntry*>(entry1)->IsSameAs(
128  reinterpret_cast<CodeEntry*>(entry2));
129  }

◆ CodeEntryHash()

static uint32_t v8::internal::ProfileNode::CodeEntryHash ( CodeEntry entry)
inlinestaticprivate

Definition at line 131 of file profile-generator.h.

131  {
132  return entry->GetCallUid();
133  }

References entry(), and v8::internal::CodeEntry::GetCallUid().

Referenced by FindChild(), and FindOrAddChild().

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

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::ProfileNode::DISALLOW_COPY_AND_ASSIGN ( ProfileNode  )
private

◆ entry()

CodeEntry* v8::internal::ProfileNode::entry ( ) const
inline

Definition at line 118 of file profile-generator.h.

118 { return entry_; }

References entry_.

Referenced by CodeEntryHash(), FindChild(), FindOrAddChild(), v8::CpuProfileNode::GetBailoutReason(), v8::CpuProfileNode::GetFunctionName(), v8::CpuProfileNode::GetScriptId(), and v8::CpuProfileNode::GetScriptResourceName().

+ Here is the caller graph for this function:

◆ FindChild()

ProfileNode * v8::internal::ProfileNode::FindChild ( CodeEntry entry)

Definition at line 184 of file profile-generator.cc.

184  {
185  HashMap::Entry* map_entry =
187  return map_entry != NULL ?
188  reinterpret_cast<ProfileNode*>(map_entry->value) : NULL;
189 }
static uint32_t CodeEntryHash(CodeEntry *entry)
ProfileNode(ProfileTree *tree, CodeEntry *entry)
Entry * Lookup(void *key, uint32_t hash, bool insert, AllocationPolicy allocator=AllocationPolicy())
Definition: hashmap.h:114
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 NULL

References children_, CodeEntryHash(), entry(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), and NULL.

+ Here is the call graph for this function:

◆ FindOrAddChild()

ProfileNode * v8::internal::ProfileNode::FindOrAddChild ( CodeEntry entry)

Definition at line 192 of file profile-generator.cc.

192  {
193  HashMap::Entry* map_entry =
195  if (map_entry->value == NULL) {
196  // New node added.
197  ProfileNode* new_node = new ProfileNode(tree_, entry);
198  map_entry->value = new_node;
199  children_list_.Add(new_node);
200  }
201  return reinterpret_cast<ProfileNode*>(map_entry->value);
202 }

References children_, children_list_, CodeEntryHash(), entry(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Lookup(), NULL, ProfileNode(), and tree_.

Referenced by v8::internal::ProfileTree::AddPathFromEnd(), and v8::internal::ProfileTree::AddPathFromStart().

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

◆ id()

unsigned v8::internal::ProfileNode::id ( ) const
inline

Definition at line 121 of file profile-generator.h.

121 { return id_; }

References id_.

◆ IncreaseSelfTicks()

void v8::internal::ProfileNode::IncreaseSelfTicks ( unsigned  amount)
inline

Definition at line 116 of file profile-generator.h.

116 { self_ticks_ += amount; }

References self_ticks_.

◆ IncrementSelfTicks()

void v8::internal::ProfileNode::IncrementSelfTicks ( )
inline

Definition at line 115 of file profile-generator.h.

115 { ++self_ticks_; }

References self_ticks_.

Referenced by v8::internal::ProfileTree::AddPathFromEnd(), and v8::internal::ProfileTree::AddPathFromStart().

+ Here is the caller graph for this function:

◆ Print()

void v8::internal::ProfileNode::Print ( int  indent)

Definition at line 205 of file profile-generator.cc.

205  {
206  base::OS::Print("%5u %*s %s%s %d #%d %s", self_ticks_, indent, "",
208  id(), entry_->bailout_reason());
209  if (entry_->resource_name()[0] != '\0')
211  base::OS::Print("\n");
212  for (HashMap::Entry* p = children_.Start();
213  p != NULL;
214  p = children_.Next(p)) {
215  reinterpret_cast<ProfileNode*>(p->value)->Print(indent + 2);
216  }
217 }
static void Print(const char *format,...)
const char * bailout_reason() const
const char * name_prefix() const
const char * resource_name() const
const char * name() const
Entry * Next(Entry *p) const
Definition: hashmap.h:226

References v8::internal::CodeEntry::bailout_reason(), children_, entry_, v8::internal::CodeEntry::line_number(), v8::internal::CodeEntry::name(), v8::internal::CodeEntry::name_prefix(), v8::internal::TemplateHashMapImpl< AllocationPolicy >::Next(), NULL, v8::base::OS::Print(), v8::internal::CodeEntry::resource_name(), v8::internal::CodeEntry::script_id(), self_ticks_, and v8::internal::TemplateHashMapImpl< AllocationPolicy >::Start().

Referenced by v8::internal::ProfileTree::Print().

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

◆ self_ticks()

unsigned v8::internal::ProfileNode::self_ticks ( ) const
inline

Definition at line 119 of file profile-generator.h.

119 { return self_ticks_; }

References self_ticks_.

Member Data Documentation

◆ children_

HashMap v8::internal::ProfileNode::children_
private

Definition at line 139 of file profile-generator.h.

Referenced by FindChild(), FindOrAddChild(), and Print().

◆ children_list_

List<ProfileNode*> v8::internal::ProfileNode::children_list_
private

Definition at line 140 of file profile-generator.h.

Referenced by children(), and FindOrAddChild().

◆ entry_

CodeEntry* v8::internal::ProfileNode::entry_
private

Definition at line 136 of file profile-generator.h.

Referenced by entry(), and Print().

◆ id_

unsigned v8::internal::ProfileNode::id_
private

Definition at line 141 of file profile-generator.h.

Referenced by id().

◆ self_ticks_

unsigned v8::internal::ProfileNode::self_ticks_
private

Definition at line 137 of file profile-generator.h.

Referenced by IncreaseSelfTicks(), IncrementSelfTicks(), Print(), and self_ticks().

◆ tree_

ProfileTree* v8::internal::ProfileNode::tree_
private

Definition at line 135 of file profile-generator.h.

Referenced by FindOrAddChild().


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