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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 const char* name, | 56 const char* name, |
57 v8::ActivityControl* control, | 57 v8::ActivityControl* control, |
58 v8::HeapProfiler::ObjectNameResolver* resolver); | 58 v8::HeapProfiler::ObjectNameResolver* resolver); |
59 HeapSnapshot* TakeSnapshot( | 59 HeapSnapshot* TakeSnapshot( |
60 String* name, | 60 String* name, |
61 v8::ActivityControl* control, | 61 v8::ActivityControl* control, |
62 v8::HeapProfiler::ObjectNameResolver* resolver); | 62 v8::HeapProfiler::ObjectNameResolver* resolver); |
63 | 63 |
64 void StartHeapObjectsTracking(); | 64 void StartHeapObjectsTracking(); |
65 void StopHeapObjectsTracking(); | 65 void StopHeapObjectsTracking(); |
66 | |
67 static void RecordObjectAllocationFromMasm(Isolate* isolate, | |
68 Address obj, | |
69 int size); | |
70 | |
66 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); | 71 SnapshotObjectId PushHeapObjectsStats(OutputStream* stream); |
67 int GetSnapshotsCount(); | 72 int GetSnapshotsCount(); |
68 HeapSnapshot* GetSnapshot(int index); | 73 HeapSnapshot* GetSnapshot(int index); |
69 SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj); | 74 SnapshotObjectId GetSnapshotObjectId(Handle<Object> obj); |
70 void DeleteAllSnapshots(); | 75 void DeleteAllSnapshots(); |
71 | 76 |
72 void ObjectMoveEvent(Address from, Address to); | 77 void ObjectMoveEvent(Address from, Address to, int size); |
78 | |
79 void NewObjectEvent(Address addr, int size); | |
80 | |
81 void UpdateObjectSizeEvent(Address addr, int size); | |
73 | 82 |
74 void DefineWrapperClass( | 83 void DefineWrapperClass( |
75 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); | 84 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); |
76 | 85 |
77 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, | 86 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, |
78 Object** wrapper); | 87 Object** wrapper); |
79 INLINE(bool is_profiling()) { | 88 INLINE(bool is_profiling()) { |
80 return snapshots_->is_tracking_objects(); | 89 return snapshots_->is_tracking_objects(); |
81 } | 90 } |
82 | 91 |
83 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); | 92 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); |
84 | 93 |
94 bool is_tracking_allocations() { | |
95 return is_tracking_allocations_; | |
96 } | |
97 | |
98 void StartHeapAllocationsRecording(); | |
99 void StopHeapAllocationsRecording(); | |
100 | |
101 int FindUntrackedObjects() { | |
102 return snapshots_->FindUntrackedObjects(); | |
103 } | |
104 | |
105 void DropCompiledCode(); | |
85 private: | 106 private: |
yurys
2013/09/25 10:41:12
style: blank line above "private:"
Alexandra Mikhaylova
2013/09/25 14:33:40
Done.
| |
86 Heap* heap() const { return snapshots_->heap(); } | 107 Heap* heap() const { return snapshots_->heap(); } |
87 | 108 |
109 void UpdateMap() { snapshots_->UpdateMap(); } | |
yurys
2013/09/25 10:41:12
Just use snapshots_->UpdateMap() instead.
Alexandra Mikhaylova
2013/09/25 14:33:40
Done.
| |
110 | |
88 HeapSnapshotsCollection* snapshots_; | 111 HeapSnapshotsCollection* snapshots_; |
89 unsigned next_snapshot_uid_; | 112 unsigned next_snapshot_uid_; |
90 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; | 113 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; |
114 bool is_tracking_allocations_; | |
91 }; | 115 }; |
92 | 116 |
93 } } // namespace v8::internal | 117 } } // namespace v8::internal |
94 | 118 |
95 #endif // V8_HEAP_PROFILER_H_ | 119 #endif // V8_HEAP_PROFILER_H_ |
OLD | NEW |