V8 Project
v8::internal::AllocationTraceNode Class Reference

#include <allocation-tracker.h>

+ Collaboration diagram for v8::internal::AllocationTraceNode:

Public Member Functions

 AllocationTraceNode (AllocationTraceTree *tree, unsigned function_info_index)
 
 ~AllocationTraceNode ()
 
AllocationTraceNodeFindChild (unsigned function_info_index)
 
AllocationTraceNodeFindOrAddChild (unsigned function_info_index)
 
void AddAllocation (unsigned size)
 
unsigned function_info_index () const
 
unsigned allocation_size () const
 
unsigned allocation_count () const
 
unsigned id () const
 
Vector< AllocationTraceNode * > children () const
 
void Print (int indent, AllocationTracker *tracker)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (AllocationTraceNode)
 

Private Attributes

AllocationTraceTreetree_
 
unsigned function_info_index_
 
unsigned total_size_
 
unsigned allocation_count_
 
unsigned id_
 
List< AllocationTraceNode * > children_
 

Detailed Description

Definition at line 17 of file allocation-tracker.h.

Constructor & Destructor Documentation

◆ AllocationTraceNode()

v8::internal::AllocationTraceNode::AllocationTraceNode ( AllocationTraceTree tree,
unsigned  function_info_index 
)

Definition at line 14 of file allocation-tracker.cc.

Referenced by FindOrAddChild().

+ Here is the caller graph for this function:

◆ ~AllocationTraceNode()

v8::internal::AllocationTraceNode::~AllocationTraceNode ( )

Definition at line 24 of file allocation-tracker.cc.

24  {
25  for (int i = 0; i < children_.length(); i++) delete children_[i];
26 }
List< AllocationTraceNode * > children_

References children_.

Member Function Documentation

◆ AddAllocation()

void v8::internal::AllocationTraceNode::AddAllocation ( unsigned  size)

Definition at line 50 of file allocation-tracker.cc.

50  {
51  total_size_ += size;
53 }
enable harmony numeric enable harmony object literal extensions Optimize object size

References allocation_count_, size, and total_size_.

Referenced by v8::internal::AllocationTracker::AllocationEvent().

+ Here is the caller graph for this function:

◆ allocation_count()

unsigned v8::internal::AllocationTraceNode::allocation_count ( ) const
inline

Definition at line 28 of file allocation-tracker.h.

28 { return allocation_count_; }

References allocation_count_.

Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNode().

+ Here is the caller graph for this function:

◆ allocation_size()

unsigned v8::internal::AllocationTraceNode::allocation_size ( ) const
inline

Definition at line 27 of file allocation-tracker.h.

27 { return total_size_; }

References total_size_.

Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNode().

+ Here is the caller graph for this function:

◆ children()

Vector<AllocationTraceNode*> v8::internal::AllocationTraceNode::children ( ) const
inline

Definition at line 30 of file allocation-tracker.h.

30 { return children_.ToVector(); }

References children_.

Referenced by v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNode().

+ Here is the caller graph for this function:

◆ DISALLOW_COPY_AND_ASSIGN()

v8::internal::AllocationTraceNode::DISALLOW_COPY_AND_ASSIGN ( AllocationTraceNode  )
private

◆ FindChild()

AllocationTraceNode * v8::internal::AllocationTraceNode::FindChild ( unsigned  function_info_index)

Definition at line 29 of file allocation-tracker.cc.

30  {
31  for (int i = 0; i < children_.length(); i++) {
33  if (node->function_info_index() == function_info_index) return node;
34  }
35  return NULL;
36 }
AllocationTraceNode(AllocationTraceTree *tree, unsigned function_info_index)
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_, function_info_index(), and NULL.

Referenced by FindOrAddChild().

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

◆ FindOrAddChild()

AllocationTraceNode * v8::internal::AllocationTraceNode::FindOrAddChild ( unsigned  function_info_index)

Definition at line 39 of file allocation-tracker.cc.

40  {
42  if (child == NULL) {
44  children_.Add(child);
45  }
46  return child;
47 }
AllocationTraceNode * FindChild(unsigned function_info_index)

References AllocationTraceNode(), children_, FindChild(), function_info_index(), NULL, and tree_.

Referenced by v8::internal::AllocationTraceTree::AddPathFromEnd().

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

◆ function_info_index()

unsigned v8::internal::AllocationTraceNode::function_info_index ( ) const
inline

Definition at line 26 of file allocation-tracker.h.

26 { return function_info_index_; }

References function_info_index_.

Referenced by FindChild(), FindOrAddChild(), and v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNode().

+ Here is the caller graph for this function:

◆ id()

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

Definition at line 29 of file allocation-tracker.h.

29 { return id_; }

References id_.

Referenced by v8::internal::AllocationTracker::AllocationEvent(), and v8::internal::HeapSnapshotJSONSerializer::SerializeTraceNode().

+ Here is the caller graph for this function:

◆ Print()

void v8::internal::AllocationTraceNode::Print ( int  indent,
AllocationTracker tracker 
)

Definition at line 56 of file allocation-tracker.cc.

56  {
57  base::OS::Print("%10u %10u %*c", total_size_, allocation_count_, indent, ' ');
58  if (tracker != NULL) {
59  AllocationTracker::FunctionInfo* info =
60  tracker->function_info_list()[function_info_index_];
61  base::OS::Print("%s #%u", info->name, id_);
62  } else {
64  }
65  base::OS::Print("\n");
66  indent += 2;
67  for (int i = 0; i < children_.length(); i++) {
68  children_[i]->Print(indent, tracker);
69  }
70 }
static void Print(const char *format,...)

References allocation_count_, children_, function_info_index_, v8::internal::AllocationTracker::function_info_list(), id_, v8::internal::AllocationTracker::FunctionInfo::name, NULL, v8::base::OS::Print(), and total_size_.

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

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

Member Data Documentation

◆ allocation_count_

unsigned v8::internal::AllocationTraceNode::allocation_count_
private

Definition at line 38 of file allocation-tracker.h.

Referenced by AddAllocation(), allocation_count(), and Print().

◆ children_

List<AllocationTraceNode*> v8::internal::AllocationTraceNode::children_
private

Definition at line 40 of file allocation-tracker.h.

Referenced by children(), FindChild(), FindOrAddChild(), Print(), and ~AllocationTraceNode().

◆ function_info_index_

unsigned v8::internal::AllocationTraceNode::function_info_index_
private

Definition at line 36 of file allocation-tracker.h.

Referenced by function_info_index(), and Print().

◆ id_

unsigned v8::internal::AllocationTraceNode::id_
private

Definition at line 39 of file allocation-tracker.h.

Referenced by id(), and Print().

◆ total_size_

unsigned v8::internal::AllocationTraceNode::total_size_
private

Definition at line 37 of file allocation-tracker.h.

Referenced by AddAllocation(), allocation_size(), and Print().

◆ tree_

AllocationTraceTree* v8::internal::AllocationTraceNode::tree_
private

Definition at line 35 of file allocation-tracker.h.

Referenced by FindOrAddChild().


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