OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 const char* script_name; | 89 const char* script_name; |
90 int script_id; | 90 int script_id; |
91 int line; | 91 int line; |
92 int column; | 92 int column; |
93 }; | 93 }; |
94 | 94 |
95 AllocationTracker(HeapObjectsMap* ids, StringsStorage* names); | 95 AllocationTracker(HeapObjectsMap* ids, StringsStorage* names); |
96 ~AllocationTracker(); | 96 ~AllocationTracker(); |
97 | 97 |
98 void PrepareForSerialization(); | 98 void PrepareForSerialization(); |
99 void NewObjectEvent(Address addr, int size); | 99 void AllocationEvent(Address addr, int size); |
100 | 100 |
101 AllocationTraceTree* trace_tree() { return &trace_tree_; } | 101 AllocationTraceTree* trace_tree() { return &trace_tree_; } |
102 HashMap* id_to_function_info() { return &id_to_function_info_; } | 102 HashMap* id_to_function_info() { return &id_to_function_info_; } |
103 FunctionInfo* GetFunctionInfo(SnapshotObjectId id); | 103 FunctionInfo* GetFunctionInfo(SnapshotObjectId id); |
104 | 104 |
105 private: | 105 private: |
106 void AddFunctionInfo(SharedFunctionInfo* info, SnapshotObjectId id); | 106 void AddFunctionInfo(SharedFunctionInfo* info, SnapshotObjectId id); |
107 | 107 |
108 class UnresolvedLocation { | 108 class UnresolvedLocation { |
109 public: | 109 public: |
(...skipping 18 matching lines...) Expand all Loading... |
128 SnapshotObjectId allocation_trace_buffer_[kMaxAllocationTraceLength]; | 128 SnapshotObjectId allocation_trace_buffer_[kMaxAllocationTraceLength]; |
129 HashMap id_to_function_info_; | 129 HashMap id_to_function_info_; |
130 List<UnresolvedLocation*> unresolved_locations_; | 130 List<UnresolvedLocation*> unresolved_locations_; |
131 | 131 |
132 DISALLOW_COPY_AND_ASSIGN(AllocationTracker); | 132 DISALLOW_COPY_AND_ASSIGN(AllocationTracker); |
133 }; | 133 }; |
134 | 134 |
135 } } // namespace v8::internal | 135 } } // namespace v8::internal |
136 | 136 |
137 #endif // V8_ALLOCATION_TRACKER_H_ | 137 #endif // V8_ALLOCATION_TRACKER_H_ |
OLD | NEW |