OLD | NEW |
1 // Copyright 2009-2010 the V8 project authors. All rights reserved. | 1 // Copyright 2009-2010 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); | 76 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); |
77 | 77 |
78 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, | 78 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, |
79 Object** wrapper); | 79 Object** wrapper); |
80 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); | 80 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); |
81 | 81 |
82 bool is_tracking_object_moves() const { return is_tracking_object_moves_; } | 82 bool is_tracking_object_moves() const { return is_tracking_object_moves_; } |
83 bool is_tracking_allocations() { return !allocation_tracker_.is_empty(); } | 83 bool is_tracking_allocations() { return !allocation_tracker_.is_empty(); } |
84 | 84 |
85 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); | 85 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); |
| 86 void ClearHeapObjectMap(); |
86 | 87 |
87 private: | 88 private: |
88 Heap* heap() const { return ids_->heap(); } | 89 Heap* heap() const { return ids_->heap(); } |
89 | 90 |
90 // Mapping from HeapObject addresses to objects' uids. | 91 // Mapping from HeapObject addresses to objects' uids. |
91 SmartPointer<HeapObjectsMap> ids_; | 92 SmartPointer<HeapObjectsMap> ids_; |
92 List<HeapSnapshot*> snapshots_; | 93 List<HeapSnapshot*> snapshots_; |
93 SmartPointer<StringsStorage> names_; | 94 SmartPointer<StringsStorage> names_; |
94 unsigned next_snapshot_uid_; | 95 unsigned next_snapshot_uid_; |
95 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; | 96 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; |
96 SmartPointer<AllocationTracker> allocation_tracker_; | 97 SmartPointer<AllocationTracker> allocation_tracker_; |
97 bool is_tracking_object_moves_; | 98 bool is_tracking_object_moves_; |
98 }; | 99 }; |
99 | 100 |
100 } } // namespace v8::internal | 101 } } // namespace v8::internal |
101 | 102 |
102 #endif // V8_HEAP_PROFILER_H_ | 103 #endif // V8_HEAP_PROFILER_H_ |
OLD | NEW |