| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_ALLOCATION_TRACKER_H_ | 5 #ifndef V8_ALLOCATION_TRACKER_H_ |
| 6 #define V8_ALLOCATION_TRACKER_H_ | 6 #define V8_ALLOCATION_TRACKER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "include/v8-profiler.h" |
| 11 #include "src/handles.h" |
| 12 #include "src/hashmap.h" |
| 13 #include "src/list.h" |
| 14 #include "src/vector.h" |
| 15 |
| 10 namespace v8 { | 16 namespace v8 { |
| 11 namespace internal { | 17 namespace internal { |
| 12 | 18 |
| 19 // Forward declarations. |
| 20 class AllocationTraceTree; |
| 21 class AllocationTracker; |
| 13 class HeapObjectsMap; | 22 class HeapObjectsMap; |
| 14 | 23 class SharedFunctionInfo; |
| 15 class AllocationTraceTree; | 24 class StringsStorage; |
| 16 | 25 |
| 17 class AllocationTraceNode { | 26 class AllocationTraceNode { |
| 18 public: | 27 public: |
| 19 AllocationTraceNode(AllocationTraceTree* tree, | 28 AllocationTraceNode(AllocationTraceTree* tree, |
| 20 unsigned function_info_index); | 29 unsigned function_info_index); |
| 21 ~AllocationTraceNode(); | 30 ~AllocationTraceNode(); |
| 22 AllocationTraceNode* FindChild(unsigned function_info_index); | 31 AllocationTraceNode* FindChild(unsigned function_info_index); |
| 23 AllocationTraceNode* FindOrAddChild(unsigned function_info_index); | 32 AllocationTraceNode* FindOrAddChild(unsigned function_info_index); |
| 24 void AddAllocation(unsigned size); | 33 void AddAllocation(unsigned size); |
| 25 | 34 |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 List<UnresolvedLocation*> unresolved_locations_; | 148 List<UnresolvedLocation*> unresolved_locations_; |
| 140 unsigned info_index_for_other_state_; | 149 unsigned info_index_for_other_state_; |
| 141 AddressToTraceMap address_to_trace_; | 150 AddressToTraceMap address_to_trace_; |
| 142 | 151 |
| 143 DISALLOW_COPY_AND_ASSIGN(AllocationTracker); | 152 DISALLOW_COPY_AND_ASSIGN(AllocationTracker); |
| 144 }; | 153 }; |
| 145 | 154 |
| 146 } } // namespace v8::internal | 155 } } // namespace v8::internal |
| 147 | 156 |
| 148 #endif // V8_ALLOCATION_TRACKER_H_ | 157 #endif // V8_ALLOCATION_TRACKER_H_ |
| OLD | NEW |