| 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 // 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_HEAP_PROFILER_H_ | 5 #ifndef V8_HEAP_PROFILER_H_ |
| 6 #define V8_HEAP_PROFILER_H_ | 6 #define V8_HEAP_PROFILER_H_ |
| 7 | 7 |
| 8 #include "src/heap-snapshot-generator-inl.h" | 8 #include "src/heap-snapshot-generator-inl.h" |
| 9 #include "src/isolate.h" | 9 #include "src/isolate.h" |
| 10 #include "src/smart-pointers.h" | 10 #include "src/smart-pointers.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 v8::HeapProfiler::ObjectNameResolver* resolver); | 26 v8::HeapProfiler::ObjectNameResolver* resolver); |
| 27 | 27 |
| 28 void StartHeapObjectsTracking(bool track_allocations); | 28 void StartHeapObjectsTracking(bool track_allocations); |
| 29 void StopHeapObjectsTracking(); | 29 void StopHeapObjectsTracking(); |
| 30 AllocationTracker* allocation_tracker() const { | 30 AllocationTracker* allocation_tracker() const { |
| 31 return allocation_tracker_.get(); | 31 return allocation_tracker_.get(); |
| 32 } | 32 } |
| 33 HeapObjectsMap* heap_object_map() const { return ids_.get(); } | 33 HeapObjectsMap* heap_object_map() const { return ids_.get(); } |
| 34 StringsStorage* names() const { return names_.get(); } | 34 StringsStorage* names() const { return names_.get(); } |
| 35 | 35 |
| 36 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); | 36 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream, |
| 37 int64_t* timestamp_us); |
| 37 int GetSnapshotsCount(); | 38 int GetSnapshotsCount(); |
| 38 HeapSnapshot* GetSnapshot(int index); | 39 HeapSnapshot* GetSnapshot(int index); |
| 39 SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj); | 40 SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj); |
| 40 void DeleteAllSnapshots(); | 41 void DeleteAllSnapshots(); |
| 41 void RemoveSnapshot(HeapSnapshot* snapshot); | 42 void RemoveSnapshot(HeapSnapshot* snapshot); |
| 42 | 43 |
| 43 void ObjectMoveEvent(Address from, Address to, int size); | 44 void ObjectMoveEvent(Address from, Address to, int size); |
| 44 | 45 |
| 45 void AllocationEvent(Address addr, int size); | 46 void AllocationEvent(Address addr, int size); |
| 46 | 47 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 69 List<HeapSnapshot*> snapshots_; | 70 List<HeapSnapshot*> snapshots_; |
| 70 SmartPointer<StringsStorage> names_; | 71 SmartPointer<StringsStorage> names_; |
| 71 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; | 72 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; |
| 72 SmartPointer<AllocationTracker> allocation_tracker_; | 73 SmartPointer<AllocationTracker> allocation_tracker_; |
| 73 bool is_tracking_object_moves_; | 74 bool is_tracking_object_moves_; |
| 74 }; | 75 }; |
| 75 | 76 |
| 76 } } // namespace v8::internal | 77 } } // namespace v8::internal |
| 77 | 78 |
| 78 #endif // V8_HEAP_PROFILER_H_ | 79 #endif // V8_HEAP_PROFILER_H_ |
| OLD | NEW |