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

Unified Diff: Source/core/inspector/InspectorHeapProfilerAgent.h

Issue 14373016: DevTools: [HeapProfiler] Provide API for heap objects tracking info. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: jank -> junk Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.cpp ('k') | Source/core/inspector/InspectorHeapProfilerAgent.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorHeapProfilerAgent.h
diff --git a/Source/core/inspector/InspectorHeapProfilerAgent.h b/Source/core/inspector/InspectorHeapProfilerAgent.h
index ad9e214f54546de08e431f8071eefd6c46d0cbba..bd9e646ae6f13182cd29b33270a48d181d096fc1 100644
--- a/Source/core/inspector/InspectorHeapProfilerAgent.h
+++ b/Source/core/inspector/InspectorHeapProfilerAgent.h
@@ -37,12 +37,15 @@
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/Noncopyable.h>
+#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/text/WTFString.h>
namespace WebCore {
+class HeapObjectsStatsStream;
class InjectedScriptManager;
+class HeapStatsUpdateTask;
class ScriptHeapSnapshot;
class ScriptProfile;
@@ -60,6 +63,8 @@ public:
virtual void getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::HeapProfiler::ProfileHeader> >&);
virtual void getHeapSnapshot(ErrorString*, int uid);
virtual void removeProfile(ErrorString*, int uid);
+ virtual void startTrackingHeapObjects(ErrorString*);
+ virtual void stopTrackingHeapObjects(ErrorString*);
virtual void setFrontend(InspectorFrontend*);
virtual void clearFrontend();
@@ -72,12 +77,18 @@ public:
virtual void reportMemoryUsage(MemoryObjectInfo*) const OVERRIDE;
+
private:
+ class HeapStatsStream;
+ class HeapStatsUpdateTask;
+
InspectorHeapProfilerAgent(InstrumentingAgents*, InspectorCompositeState*, InjectedScriptManager*);
typedef HashMap<unsigned, RefPtr<ScriptHeapSnapshot> > IdToHeapSnapshotMap;
void resetFrontendProfiles();
+ void requestHeapStatsUpdate();
+ void pushHeapStatsUpdate(const uint32_t* const data, const int size);
PassRefPtr<TypeBuilder::HeapProfiler::ProfileHeader> createSnapshotHeader(const ScriptHeapSnapshot&);
@@ -85,6 +96,7 @@ private:
InspectorFrontend::HeapProfiler* m_frontend;
unsigned m_nextUserInitiatedHeapSnapshotNumber;
IdToHeapSnapshotMap m_snapshots;
+ OwnPtr<HeapStatsUpdateTask> m_heapStatsUpdateTask;
};
} // namespace WebCore
« no previous file with comments | « Source/bindings/v8/ScriptProfiler.cpp ('k') | Source/core/inspector/InspectorHeapProfilerAgent.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698