28 #ifndef V8_ALLOCATION_TRACKER_H_
29 #define V8_ALLOCATION_TRACKER_H_
38 class AllocationTraceTree;
52 unsigned id()
const {
return id_; }
59 unsigned function_info_index_;
61 unsigned allocation_count_;
79 unsigned next_node_id_;
92 size_t size() {
return ranges_.size(); }
97 RangeStack(
Address start,
unsigned node_id)
98 : start(start), trace_node_id(node_id) {}
100 unsigned trace_node_id;
103 typedef std::map<Address, RangeStack> RangeMap;
130 return function_info_list_;
136 static void DeleteFunctionInfo(FunctionInfo**
info);
137 unsigned functionInfoIndexForVMState(
StateTag state);
139 class UnresolvedLocation {
141 UnresolvedLocation(
Script* script,
int start, FunctionInfo*
info);
142 ~UnresolvedLocation();
146 static void HandleWeakScript(
153 static void DeleteUnresolvedLocation(UnresolvedLocation** location);
155 static const int kMaxAllocationTraceLength = 64;
156 HeapObjectsMap* ids_;
157 StringsStorage* names_;
158 AllocationTraceTree trace_tree_;
159 unsigned allocation_trace_buffer_[kMaxAllocationTraceLength];
160 List<FunctionInfo*> function_info_list_;
161 HashMap id_to_function_info_index_;
162 List<UnresolvedLocation*> unresolved_locations_;
163 unsigned info_index_for_other_state_;
164 AddressToTraceMap address_to_trace_;
171 #endif // V8_ALLOCATION_TRACKER_H_
void Print(AllocationTracker *tracker)
AllocationTraceNode * FindChild(unsigned function_info_index)
SnapshotObjectId function_id
void AddRange(Address addr, int size, unsigned node_id)
unsigned allocation_count() const
AddressToTraceMap * address_to_trace()
void AddAllocation(unsigned size)
AllocationTraceNode * AddPathFromEnd(const Vector< unsigned > &path)
unsigned allocation_size() const
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object size
unsigned function_info_index() const
AllocationTraceNode * root()
void PrepareForSerialization()
Vector< AllocationTraceNode * > children() const
AllocationTraceNode * FindOrAddChild(unsigned function_info_index)
unsigned GetTraceNodeId(Address addr)
void AllocationEvent(Address addr, int size)
const List< FunctionInfo * > & function_info_list() const
AllocationTraceTree * trace_tree()
AllocationTracker(HeapObjectsMap *ids, StringsStorage *names)
void MoveObject(Address from, Address to, int size)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function info
uint32_t SnapshotObjectId
TemplateHashMapImpl< FreeStoreAllocationPolicy > HashMap
void Print(int indent, AllocationTracker *tracker)
AllocationTraceNode(AllocationTraceTree *tree, unsigned function_info_index)