Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Side by Side Diff: src/profiler/heap-profiler.h

Issue 2631063003: [api,profiler] Introduce GetRetainerInfos callback for profiling (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/api.cc ('k') | src/profiler/heap-profiler.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_PROFILER_HEAP_PROFILER_H_ 5 #ifndef V8_PROFILER_HEAP_PROFILER_H_
6 #define V8_PROFILER_HEAP_PROFILER_H_ 6 #define V8_PROFILER_HEAP_PROFILER_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "src/isolate.h" 10 #include "src/isolate.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void UpdateObjectSizeEvent(Address addr, int size); 60 void UpdateObjectSizeEvent(Address addr, int size);
61 61
62 void DefineWrapperClass( 62 void DefineWrapperClass(
63 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback); 63 uint16_t class_id, v8::HeapProfiler::WrapperInfoCallback callback);
64 64
65 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id, 65 v8::RetainedObjectInfo* ExecuteWrapperClassCallback(uint16_t class_id,
66 Object** wrapper); 66 Object** wrapper);
67 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info); 67 void SetRetainedObjectInfo(UniqueId id, RetainedObjectInfo* info);
68 68
69 void SetGetRetainerInfosCallback(
70 v8::HeapProfiler::GetRetainerInfosCallback callback);
71
72 v8::HeapProfiler::RetainerInfos GetRetainerInfos(Isolate* isolate);
73
69 bool is_tracking_object_moves() const { return is_tracking_object_moves_; } 74 bool is_tracking_object_moves() const { return is_tracking_object_moves_; }
70 bool is_tracking_allocations() const { return !!allocation_tracker_; } 75 bool is_tracking_allocations() const { return !!allocation_tracker_; }
71 76
72 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id); 77 Handle<HeapObject> FindHeapObjectById(SnapshotObjectId id);
73 void ClearHeapObjectMap(); 78 void ClearHeapObjectMap();
74 79
75 Isolate* isolate() const { return heap()->isolate(); } 80 Isolate* isolate() const { return heap()->isolate(); }
76 81
77 private: 82 private:
78 Heap* heap() const; 83 Heap* heap() const;
79 84
80 // Mapping from HeapObject addresses to objects' uids. 85 // Mapping from HeapObject addresses to objects' uids.
81 std::unique_ptr<HeapObjectsMap> ids_; 86 std::unique_ptr<HeapObjectsMap> ids_;
82 List<HeapSnapshot*> snapshots_; 87 List<HeapSnapshot*> snapshots_;
83 std::unique_ptr<StringsStorage> names_; 88 std::unique_ptr<StringsStorage> names_;
84 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_; 89 List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
85 std::unique_ptr<AllocationTracker> allocation_tracker_; 90 std::unique_ptr<AllocationTracker> allocation_tracker_;
86 bool is_tracking_object_moves_; 91 bool is_tracking_object_moves_;
87 base::Mutex profiler_mutex_; 92 base::Mutex profiler_mutex_;
88 std::unique_ptr<SamplingHeapProfiler> sampling_heap_profiler_; 93 std::unique_ptr<SamplingHeapProfiler> sampling_heap_profiler_;
94 v8::HeapProfiler::GetRetainerInfosCallback get_retainer_infos_callback_;
89 95
90 DISALLOW_COPY_AND_ASSIGN(HeapProfiler); 96 DISALLOW_COPY_AND_ASSIGN(HeapProfiler);
91 }; 97 };
92 98
93 } // namespace internal 99 } // namespace internal
94 } // namespace v8 100 } // namespace v8
95 101
96 #endif // V8_PROFILER_HEAP_PROFILER_H_ 102 #endif // V8_PROFILER_HEAP_PROFILER_H_
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/profiler/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698