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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 HeapSnapshot* TakeSnapshot( | 58 HeapSnapshot* TakeSnapshot( |
59 String* name, | 59 String* name, |
60 v8::ActivityControl* control, | 60 v8::ActivityControl* control, |
61 v8::HeapProfiler::ObjectNameResolver* resolver); | 61 v8::HeapProfiler::ObjectNameResolver* resolver); |
62 | 62 |
63 void StartHeapObjectsTracking(); | 63 void StartHeapObjectsTracking(); |
64 void StopHeapObjectsTracking(); | 64 void StopHeapObjectsTracking(); |
65 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); | 65 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); |
66 int GetSnapshotsCount(); | 66 int GetSnapshotsCount(); |
67 HeapSnapshot* GetSnapshot(int index); | 67 HeapSnapshot* GetSnapshot(int index); |
68 HeapSnapshot* FindSnapshot(unsigned uid); | |
69 SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj); | 68 SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj); |
70 void DeleteAllSnapshots(); | 69 void DeleteAllSnapshots(); |
71 | 70 |
72 void ObjectMoveEvent(Address from, Address to); | 71 void ObjectMoveEvent(Address from, Address to); |
73 | 72 |
74 void DefineWrapperClass( | 73 void DefineWrapperClass( |
75 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); | 74 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); |
76 | 75 |
77 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, | 76 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, |
78 Object** wrapper); | 77 Object** wrapper); |
79 INLINE(bool is_profiling()) { | 78 INLINE(bool is_profiling()) { |
80 return snapshots_->is_tracking_objects(); | 79 return snapshots_->is_tracking_objects(); |
81 } | 80 } |
82 | 81 |
83 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); | 82 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); |
84 | 83 |
85 private: | 84 private: |
86 Heap* heap() const { return snapshots_->heap(); } | 85 Heap* heap() const { return snapshots_->heap(); } |
87 | 86 |
88 HeapSnapshotsCollection* snapshots_; | 87 HeapSnapshotsCollection* snapshots_; |
89 unsigned next_snapshot_uid_; | 88 unsigned next_snapshot_uid_; |
90 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; | 89 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; |
91 }; | 90 }; |
92 | 91 |
93 } } // namespace v8::internal | 92 } } // namespace v8::internal |
94 | 93 |
95 #endif // V8_HEAP_PROFILER_H_ | 94 #endif // V8_HEAP_PROFILER_H_ |
OLD | NEW |