Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Feb 2013 13:54:01 +0000 (13:54 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Feb 2013 13:54:01 +0000 (13:54 +0000)
commitccaaef2c5d0f7abf2da321da9ab757e2c92aa375
tree3ced37f6cfc8fa60d91c25d0272c723a990cf7d1
parent3ac3afb49f6d18d40a65119efbc45481798daabb
Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler
https://bugs.webkit.org/show_bug.cgi?id=108653

Patch by Alexei Filippov <alph@chromium.org> on 2013-02-11
Reviewed by Yury Semikhatsky.

Currently CPU and heap profilers share the same domain 'Profiler' in the protocol.
In fact these two profile types have not too much in common. So put each into its own domain.
It should also help when Profiles panel gets split into several tools.
This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't
change the original InspectorProfilerAgent.

PerformanceTests:

* inspector/heap-snapshot-performance-test.js:
(test.performanceTest.cleanup):

Source/WebCore:

* CMakeLists.txt:
* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.vcxproj/WebCore.vcxproj:
* WebCore.vcxproj/WebCore.vcxproj.filters:
* WebCore.xcodeproj/project.pbxproj:
* inspector/Inspector.json:
* inspector/InspectorAllInOne.cpp:
* inspector/InspectorController.cpp:
(WebCore::InspectorController::InspectorController):
* inspector/InspectorHeapProfilerAgent.cpp: Added.
(WebCore):
(WebCore::InspectorHeapProfilerAgent::create):
(WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::resetState):
(WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles):
(WebCore::InspectorHeapProfilerAgent::setFrontend):
(WebCore::InspectorHeapProfilerAgent::clearFrontend):
(WebCore::InspectorHeapProfilerAgent::restore):
(WebCore::InspectorHeapProfilerAgent::collectGarbage):
(WebCore::InspectorHeapProfilerAgent::createSnapshotHeader):
(WebCore::InspectorHeapProfilerAgent::hasHeapProfiler):
(WebCore::InspectorHeapProfilerAgent::getProfileHeaders):
(WebCore::InspectorHeapProfilerAgent::getHeapSnapshot):
(WebCore::InspectorHeapProfilerAgent::removeProfile):
(WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot):
(WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId):
(WebCore::InspectorHeapProfilerAgent::getHeapObjectId):
(WebCore::InspectorHeapProfilerAgent::reportMemoryUsage):
* inspector/InspectorHeapProfilerAgent.h: Added.
(WebCore):
(InspectorHeapProfilerAgent):
(WebCore::InspectorHeapProfilerAgent::clearProfiles):
* inspector/InspectorInstrumentation.cpp:
(WebCore):
(WebCore::InspectorInstrumentation::didCommitLoadImpl):
* inspector/InstrumentingAgents.h:
(WebCore):
(InstrumentingAgents):
(WebCore::InstrumentingAgents::inspectorHeapProfilerAgent):
(WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent):
* inspector/WorkerInspectorController.cpp:
(WebCore::WorkerInspectorController::WorkerInspectorController):
* inspector/front-end/HeapSnapshotDataGrids.js:
* inspector/front-end/HeapSnapshotGridNodes.js:
(WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent):
* inspector/front-end/HeapSnapshotView.js:
(WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer):
(WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
(WebInspector.HeapProfileHeader.prototype.saveToFile):
* inspector/front-end/ProfilesPanel.js:
(WebInspector.ProfilesPanel):
(WebInspector.ProfilesPanel.prototype._clearProfiles):
(WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked):
(WebInspector.ProfilesPanel.prototype._removeProfileHeader):
(WebInspector.ProfilesPanel.prototype._populateProfiles.var):
(WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback):
(WebInspector.ProfilesPanel.prototype._populateProfiles):
(WebInspector.ProfilesPanel.prototype.takeHeapSnapshot):
(WebInspector.ProfilesPanel.prototype.revealInView):
(WebInspector.HeapProfilerDispatcher):
(WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader):
(WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk):
(WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot):
(WebInspector.HeapProfilerDispatcher.prototype.resetProfiles):
(WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress):
* inspector/front-end/TimelinePanel.js:
(WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked):
* inspector/front-end/inspector.js:
(WebInspector.doLoadedDone):

Source/WebKit/chromium:

* src/WebDevToolsAgentImpl.cpp:
(WebKit::WebDevToolsAgent::shouldInterruptForMessage):

LayoutTests:

* inspector-protocol/heap-profiler/resources/heap-snapshot-common.js:
(InspectorTest.takeHeapSnapshot.InspectorTest.eventHandler.string_appeared_here):
(InspectorTest.takeHeapSnapshot):
* inspector-protocol/nmi-webaudio-leak-test.html:
* inspector/profiler/heap-snapshot-get-profile-crash.html:
* inspector/profiler/heap-snapshot-inspect-dom-wrapper.html:
* inspector/profiler/heap-snapshot-loader.html:
* inspector/profiler/heap-snapshot-test.js:
(initialize_HeapSnapshotTest):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@142460 268f45cc-cd09-0410-ab3c-d52691b4dbfc
34 files changed:
LayoutTests/ChangeLog
LayoutTests/inspector-protocol/heap-profiler/resources/heap-snapshot-common.js
LayoutTests/inspector-protocol/nmi-webaudio-leak-test.html
LayoutTests/inspector/profiler/heap-snapshot-get-profile-crash.html
LayoutTests/inspector/profiler/heap-snapshot-inspect-dom-wrapper.html
LayoutTests/inspector/profiler/heap-snapshot-loader.html
LayoutTests/inspector/profiler/heap-snapshot-test.js
PerformanceTests/ChangeLog
PerformanceTests/inspector/heap-snapshot-performance-test.js
Source/WebCore/CMakeLists.txt
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorAllInOne.cpp
Source/WebCore/inspector/InspectorController.cpp
Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp [new file with mode: 0644]
Source/WebCore/inspector/InspectorHeapProfilerAgent.h [new file with mode: 0644]
Source/WebCore/inspector/InspectorInstrumentation.cpp
Source/WebCore/inspector/InstrumentingAgents.h
Source/WebCore/inspector/WorkerInspectorController.cpp
Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js
Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js
Source/WebCore/inspector/front-end/HeapSnapshotView.js
Source/WebCore/inspector/front-end/ProfilesPanel.js
Source/WebCore/inspector/front-end/TimelinePanel.js
Source/WebCore/inspector/front-end/inspector.js
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp