Changeset 142460 in webkit
- Timestamp:
- Feb 11, 2013 5:54:01 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r142458 r142460 1 2013-02-11 Alexei Filippov <alph@chromium.org> 2 3 Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler 4 https://bugs.webkit.org/show_bug.cgi?id=108653 5 6 Reviewed by Yury Semikhatsky. 7 8 Currently CPU and heap profilers share the same domain 'Profiler' in the protocol. 9 In fact these two profile types have not too much in common. So put each into its own domain. 10 It should also help when Profiles panel gets split into several tools. 11 This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't 12 change the original InspectorProfilerAgent. 13 14 * inspector-protocol/heap-profiler/resources/heap-snapshot-common.js: 15 (InspectorTest.takeHeapSnapshot.InspectorTest.eventHandler.string_appeared_here): 16 (InspectorTest.takeHeapSnapshot): 17 * inspector-protocol/nmi-webaudio-leak-test.html: 18 * inspector/profiler/heap-snapshot-get-profile-crash.html: 19 * inspector/profiler/heap-snapshot-inspect-dom-wrapper.html: 20 * inspector/profiler/heap-snapshot-loader.html: 21 * inspector/profiler/heap-snapshot-test.js: 22 (initialize_HeapSnapshotTest): 23 1 24 2013-02-11 Christophe Dumez <ch.dumez@sisa.samsung.com> 2 25 -
trunk/LayoutTests/inspector-protocol/heap-profiler/resources/heap-snapshot-common.js
r141393 r142460 10 10 InspectorTest.takeHeapSnapshot = function(callback) 11 11 { 12 InspectorTest.eventHandler[" Profiler.addProfileHeader"] = function(messageObject)12 InspectorTest.eventHandler["HeapProfiler.addProfileHeader"] = function(messageObject) 13 13 { 14 14 var profileId = messageObject["params"]["header"]["uid"]; 15 InspectorTest.sendCommand(" Profiler.getHeapSnapshot", { "uid": profileId }, didGetHeapSnapshot);15 InspectorTest.sendCommand("HeapProfiler.getHeapSnapshot", { "uid": profileId }, didGetHeapSnapshot); 16 16 17 17 function didGetHeapSnapshot(messageObject) … … 23 23 24 24 var chunks = []; 25 InspectorTest.eventHandler[" Profiler.addHeapSnapshotChunk"] = function(messageObject)25 InspectorTest.eventHandler["HeapProfiler.addHeapSnapshotChunk"] = function(messageObject) 26 26 { 27 27 chunks.push(messageObject["params"]["chunk"]); 28 28 } 29 29 30 InspectorTest.eventHandler[" Profiler.finishHeapSnapshot"] = function(messageObject)30 InspectorTest.eventHandler["HeapProfiler.finishHeapSnapshot"] = function(messageObject) 31 31 { 32 32 var serializedSnapshot = chunks.join(""); … … 36 36 } 37 37 38 InspectorTest.sendCommand(" Profiler.takeHeapSnapshot", {});38 InspectorTest.sendCommand("HeapProfiler.takeHeapSnapshot", {}); 39 39 } -
trunk/LayoutTests/inspector-protocol/nmi-webaudio-leak-test.html
r142239 r142460 61 61 function iFrameNavigated(messageObject) { 62 62 InspectorTest.log("PASS: IFrame was navigated to resources/blank.html"); 63 InspectorTest.sendCommand(' Profiler.collectGarbage', {}, function() { } );63 InspectorTest.sendCommand('HeapProfiler.collectGarbage', {}, function() { } ); 64 64 InspectorTest.log("Action: Run GC and check Page.Audio data size"); 65 65 InspectorTest.sendCommand('Memory.getProcessMemoryDistribution', {}, noAudioSharedData); -
trunk/LayoutTests/inspector/profiler/heap-snapshot-get-profile-crash.html
r139998 r142460 15 15 next(); 16 16 } 17 ProfilerAgent.getHeapSnapshot(-1, finish);17 HeapProfilerAgent.getHeapSnapshot(-1, finish); 18 18 } 19 19 ]); -
trunk/LayoutTests/inspector/profiler/heap-snapshot-inspect-dom-wrapper.html
r125966 r142460 15 15 { 16 16 WebInspector.showPanel("profiles"); 17 ProfilerAgent.takeHeapSnapshot(step0);17 HeapProfilerAgent.takeHeapSnapshot(step0); 18 18 19 19 function step0() … … 43 43 } 44 44 for (var i = 0; i < bodyWrapperIds.length; i++) 45 ProfilerAgent.getObjectByHeapObjectId(bodyWrapperIds[i], undefined, didGetObjectByHeapObjectId);45 HeapProfilerAgent.getObjectByHeapObjectId(bodyWrapperIds[i], undefined, didGetObjectByHeapObjectId); 46 46 47 47 var resolvedObjectsCount = 0; … … 70 70 return; 71 71 72 ProfilerAgent.clearProfiles(done);72 HeapProfilerAgent.clearProfiles(done); 73 73 WebInspector.panels.profiles._reset(); 74 74 } -
trunk/LayoutTests/inspector/profiler/heap-snapshot-loader.html
r140306 r142460 18 18 19 19 function injectMockProfile(overrideGetProfile, callback) { 20 var dispatcher = InspectorBackend._domainDispatchers[" Profiler"];20 var dispatcher = InspectorBackend._domainDispatchers["HeapProfiler"]; 21 21 var panel = WebInspector.panels.profiles; 22 22 panel._reset(); … … 40 40 { 41 41 if (overrideGetProfile) 42 InspectorTest.override( ProfilerAgent, "getHeapSnapshot", getHeapSnapshotMock);42 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", getHeapSnapshotMock); 43 43 callback(profileHeader); 44 44 } 45 45 InspectorTest.addSniffer(profileHeader, "_snapshotReceived", snapshotLoaded); 46 46 47 InspectorTest.override( ProfilerAgent, "getHeapSnapshot", getHeapSnapshotMock);47 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", getHeapSnapshotMock); 48 48 panel.showProfile(profileHeader); 49 49 } -
trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js
r139998 r142460 173 173 { 174 174 InspectorTest.addResult("Profiler was enabled."); 175 // We mock out ProfilerAgent -- as DRT runs in single-process mode, Inspector175 // We mock out HeapProfilerAgent -- as DRT runs in single-process mode, Inspector 176 176 // and test share the same heap. Taking a snapshot takes too long for a test, 177 177 // so we provide synthetic snapshots. … … 736 736 WebInspector.panels.profiles._finishHeapSnapshot(uid); 737 737 } 738 InspectorTest.override( ProfilerAgent, "getHeapSnapshot", pushGeneratedSnapshot);738 InspectorTest.override(HeapProfilerAgent, "getHeapSnapshot", pushGeneratedSnapshot); 739 739 InspectorTest._takeAndOpenSnapshotCallback = callback; 740 740 WebInspector.panels.profiles.addProfileHeader(profile); -
trunk/PerformanceTests/ChangeLog
r141906 r142460 1 2013-02-11 Alexei Filippov <alph@chromium.org> 2 3 Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler 4 https://bugs.webkit.org/show_bug.cgi?id=108653 5 6 Reviewed by Yury Semikhatsky. 7 8 Currently CPU and heap profilers share the same domain 'Profiler' in the protocol. 9 In fact these two profile types have not too much in common. So put each into its own domain. 10 It should also help when Profiles panel gets split into several tools. 11 This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't 12 change the original InspectorProfilerAgent. 13 14 * inspector/heap-snapshot-performance-test.js: 15 (test.performanceTest.cleanup): 16 1 17 2013-02-05 Dominik Röttsches <dominik.rottsches@intel.com> 2 18 -
trunk/PerformanceTests/inspector/heap-snapshot-performance-test.js
r140534 r142460 28 28 var fullTimerCookie = timer.start("full-summary-snapshot-time"); 29 29 var backendTimerCookie = timer.start("take-snapshot"); 30 ProfilerAgent.takeHeapSnapshot(step0);30 HeapProfilerAgent.takeHeapSnapshot(step0); 31 31 32 32 function step0() … … 60 60 timer.finish(fullTimerCookie); 61 61 clearTimerCookie = timer.start("clear-snapshot"); 62 ProfilerAgent.clearProfiles(done);62 HeapProfilerAgent.clearProfiles(done); 63 63 WebInspector.panels.profiles._reset(); 64 64 } -
trunk/Source/WebCore/CMakeLists.txt
r142427 r142460 1642 1642 inspector/InspectorFrontendClientLocal.cpp 1643 1643 inspector/InspectorFrontendHost.cpp 1644 inspector/InspectorHeapProfilerAgent.cpp 1644 1645 inspector/InspectorHistory.cpp 1645 1646 inspector/InspectorIndexedDBAgent.cpp -
trunk/Source/WebCore/ChangeLog
r142459 r142460 1 2013-02-11 Alexei Filippov <alph@chromium.org> 2 3 Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler 4 https://bugs.webkit.org/show_bug.cgi?id=108653 5 6 Reviewed by Yury Semikhatsky. 7 8 Currently CPU and heap profilers share the same domain 'Profiler' in the protocol. 9 In fact these two profile types have not too much in common. So put each into its own domain. 10 It should also help when Profiles panel gets split into several tools. 11 This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't 12 change the original InspectorProfilerAgent. 13 14 * CMakeLists.txt: 15 * GNUmakefile.list.am: 16 * Target.pri: 17 * WebCore.gypi: 18 * WebCore.vcproj/WebCore.vcproj: 19 * WebCore.vcxproj/WebCore.vcxproj: 20 * WebCore.vcxproj/WebCore.vcxproj.filters: 21 * WebCore.xcodeproj/project.pbxproj: 22 * inspector/Inspector.json: 23 * inspector/InspectorAllInOne.cpp: 24 * inspector/InspectorController.cpp: 25 (WebCore::InspectorController::InspectorController): 26 * inspector/InspectorHeapProfilerAgent.cpp: Added. 27 (WebCore): 28 (WebCore::InspectorHeapProfilerAgent::create): 29 (WebCore::InspectorHeapProfilerAgent::InspectorHeapProfilerAgent): 30 (WebCore::InspectorHeapProfilerAgent::~InspectorHeapProfilerAgent): 31 (WebCore::InspectorHeapProfilerAgent::resetState): 32 (WebCore::InspectorHeapProfilerAgent::resetFrontendProfiles): 33 (WebCore::InspectorHeapProfilerAgent::setFrontend): 34 (WebCore::InspectorHeapProfilerAgent::clearFrontend): 35 (WebCore::InspectorHeapProfilerAgent::restore): 36 (WebCore::InspectorHeapProfilerAgent::collectGarbage): 37 (WebCore::InspectorHeapProfilerAgent::createSnapshotHeader): 38 (WebCore::InspectorHeapProfilerAgent::hasHeapProfiler): 39 (WebCore::InspectorHeapProfilerAgent::getProfileHeaders): 40 (WebCore::InspectorHeapProfilerAgent::getHeapSnapshot): 41 (WebCore::InspectorHeapProfilerAgent::removeProfile): 42 (WebCore::InspectorHeapProfilerAgent::takeHeapSnapshot): 43 (WebCore::InspectorHeapProfilerAgent::getObjectByHeapObjectId): 44 (WebCore::InspectorHeapProfilerAgent::getHeapObjectId): 45 (WebCore::InspectorHeapProfilerAgent::reportMemoryUsage): 46 * inspector/InspectorHeapProfilerAgent.h: Added. 47 (WebCore): 48 (InspectorHeapProfilerAgent): 49 (WebCore::InspectorHeapProfilerAgent::clearProfiles): 50 * inspector/InspectorInstrumentation.cpp: 51 (WebCore): 52 (WebCore::InspectorInstrumentation::didCommitLoadImpl): 53 * inspector/InstrumentingAgents.h: 54 (WebCore): 55 (InstrumentingAgents): 56 (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent): 57 (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent): 58 * inspector/WorkerInspectorController.cpp: 59 (WebCore::WorkerInspectorController::WorkerInspectorController): 60 * inspector/front-end/HeapSnapshotDataGrids.js: 61 * inspector/front-end/HeapSnapshotGridNodes.js: 62 (WebInspector.HeapSnapshotGenericObjectNode.prototype.queryObjectContent): 63 * inspector/front-end/HeapSnapshotView.js: 64 (WebInspector.HeapProfileHeader.prototype.startSnapshotTransfer): 65 (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen): 66 (WebInspector.HeapProfileHeader.prototype.saveToFile): 67 * inspector/front-end/ProfilesPanel.js: 68 (WebInspector.ProfilesPanel): 69 (WebInspector.ProfilesPanel.prototype._clearProfiles): 70 (WebInspector.ProfilesPanel.prototype._garbageCollectButtonClicked): 71 (WebInspector.ProfilesPanel.prototype._removeProfileHeader): 72 (WebInspector.ProfilesPanel.prototype._populateProfiles.var): 73 (WebInspector.ProfilesPanel.prototype._populateProfiles.populateCallback): 74 (WebInspector.ProfilesPanel.prototype._populateProfiles): 75 (WebInspector.ProfilesPanel.prototype.takeHeapSnapshot): 76 (WebInspector.ProfilesPanel.prototype.revealInView): 77 (WebInspector.HeapProfilerDispatcher): 78 (WebInspector.HeapProfilerDispatcher.prototype.addProfileHeader): 79 (WebInspector.HeapProfilerDispatcher.prototype.addHeapSnapshotChunk): 80 (WebInspector.HeapProfilerDispatcher.prototype.finishHeapSnapshot): 81 (WebInspector.HeapProfilerDispatcher.prototype.resetProfiles): 82 (WebInspector.HeapProfilerDispatcher.prototype.reportHeapSnapshotProgress): 83 * inspector/front-end/TimelinePanel.js: 84 (WebInspector.TimelinePanel.prototype._garbageCollectButtonClicked): 85 * inspector/front-end/inspector.js: 86 (WebInspector.doLoadedDone): 87 1 88 2013-02-11 Mike West <mkwst@chromium.org> 2 89 -
trunk/Source/WebCore/GNUmakefile.list.am
r142427 r142460 3834 3834 Source/WebCore/inspector/InspectorFrontendHost.cpp \ 3835 3835 Source/WebCore/inspector/InspectorFrontendHost.h \ 3836 Source/WebCore/inspector/InspectorHeapProfilerAgent.cpp \ 3837 Source/WebCore/inspector/InspectorHeapProfilerAgent.h \ 3836 3838 Source/WebCore/inspector/InspectorHistory.cpp \ 3837 3839 Source/WebCore/inspector/InspectorHistory.h \ -
trunk/Source/WebCore/Target.pri
r142427 r142460 800 800 inspector/InspectorFrontendClientLocal.cpp \ 801 801 inspector/InspectorFrontendHost.cpp \ 802 inspector/InspectorHeapProfilerAgent.cpp \ 802 803 inspector/InspectorHistory.cpp \ 803 804 inspector/InspectorInputAgent.cpp \ … … 1993 1994 inspector/InspectorFrontendClientLocal.h \ 1994 1995 inspector/InspectorFrontendHost.h \ 1996 inspector/InspectorHeapProfilerAgent.h \ 1995 1997 inspector/InspectorHistory.h \ 1996 1998 inspector/InspectorInstrumentation.h \ -
trunk/Source/WebCore/WebCore.gypi
r142427 r142460 1879 1879 'inspector/InspectorFrontendHost.cpp', 1880 1880 'inspector/InspectorFrontendHost.h', 1881 'inspector/InspectorHeapProfilerAgent.cpp', 1882 'inspector/InspectorHeapProfilerAgent.h', 1881 1883 'inspector/InspectorHistory.cpp', 1882 1884 'inspector/InspectorHistory.h', -
trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj
r142427 r142460 76052 76052 </File> 76053 76053 <File 76054 RelativePath="..\inspector\InspectorHeapProfilerAgent.cpp" 76055 > 76056 <FileConfiguration 76057 Name="Release|Win32" 76058 ExcludedFromBuild="true" 76059 > 76060 <Tool 76061 Name="VCCLCompilerTool" 76062 /> 76063 </FileConfiguration> 76064 <FileConfiguration 76065 Name="Production|Win32" 76066 ExcludedFromBuild="true" 76067 > 76068 <Tool 76069 Name="VCCLCompilerTool" 76070 /> 76071 </FileConfiguration> 76072 </File> 76073 <File 76074 RelativePath="..\inspector\InspectorHeapProfilerAgent.h" 76075 > 76076 </File> 76077 <File 76054 76078 RelativePath="..\inspector\InspectorHistory.cpp" 76055 76079 > -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r142427 r142460 5691 5691 </ClCompile> 5692 5692 <ClCompile Include="..\inspector\InspectorFrontendHost.cpp"> 5693 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 5694 </ClCompile> 5695 <ClCompile Include="..\inspector\InspectorHeapProfilerAgent.cpp"> 5693 5696 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 5694 5697 </ClCompile> … … 8371 8374 <ClInclude Include="..\inspector\InspectorFrontendClientLocal.h" /> 8372 8375 <ClInclude Include="..\inspector\InspectorFrontendHost.h" /> 8376 <ClInclude Include="..\inspector\InspectorHeapProfilerAgent.h" /> 8373 8377 <ClInclude Include="..\inspector\InspectorHistory.h" /> 8374 8378 <ClInclude Include="..\inspector\InspectorIndexedDBAgent.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r142193 r142460 6493 6493 <Filter>inspector</Filter> 6494 6494 </ClCompile> 6495 <ClCompile Include="..\inspector\InspectorHeapProfilerAgent.cpp"> 6496 <Filter>inspector</Filter> 6497 </ClCompile> 6495 6498 <ClCompile Include="..\inspector\InspectorHistory.cpp"> 6496 6499 <Filter>inspector</Filter> … … 13778 13781 </ClInclude> 13779 13782 <ClInclude Include="..\inspector\InspectorFrontendHost.h"> 13783 <Filter>inspector</Filter> 13784 </ClInclude> 13785 <ClInclude Include="..\inspector\InspectorHeapProfilerAgent.h"> 13780 13786 <Filter>inspector</Filter> 13781 13787 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r142427 r142460 3816 3816 9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */; }; 3817 3817 9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */; }; 3818 5112935F3D54B4B52FAF973F /* InspectorHeapProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */; }; 3819 511293603D60B4B52FAF973F /* InspectorHeapProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */; }; 3818 3820 9F3B947E12241758005304E7 /* ScriptHeapSnapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */; }; 3819 3821 9F6FC1961122E82A00E80196 /* ScriptDebugServer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */; }; … … 11281 11283 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorProfilerAgent.cpp; sourceTree = "<group>"; }; 11282 11284 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorProfilerAgent.h; sourceTree = "<group>"; }; 11285 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorHeapProfilerAgent.cpp; sourceTree = "<group>"; }; 11286 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorHeapProfilerAgent.h; sourceTree = "<group>"; }; 11283 11287 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptHeapSnapshot.h; sourceTree = "<group>"; }; 11284 11288 9F6FC1941122E82A00E80196 /* ScriptDebugServer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptDebugServer.cpp; sourceTree = "<group>"; }; … … 15216 15220 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */, 15217 15221 7A0E770D10C00A8800A0276E /* InspectorFrontendHost.idl */, 15222 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */, 15223 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */, 15218 15224 7A54857D14E02D51006AE05A /* InspectorHistory.cpp */, 15219 15225 7A54857E14E02D51006AE05A /* InspectorHistory.h */, … … 24663 24669 F344C75311294D9D00F26EEE /* InspectorFrontendClientLocal.h in Headers */, 24664 24670 7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */, 24671 511293603D60B4B52FAF973F /* InspectorHeapProfilerAgent.h in Headers */, 24665 24672 7A54858014E02D51006AE05A /* InspectorHistory.h in Headers */, 24666 24673 7ACD88D414C08BD60084EDD2 /* InspectorIndexedDBAgent.h in Headers */, … … 27941 27948 F344C75811294FF600F26EEE /* InspectorFrontendClientLocal.cpp in Sources */, 27942 27949 7A0E770E10C00A8800A0276E /* InspectorFrontendHost.cpp in Sources */, 27950 5112935F3D54B4B52FAF973F /* InspectorHeapProfilerAgent.cpp in Sources */, 27943 27951 7A54857F14E02D51006AE05A /* InspectorHistory.cpp in Sources */, 27944 27952 7ACD88D314C08BD60084EDD2 /* InspectorIndexedDBAgent.cpp in Sources */, -
trunk/Source/WebCore/inspector/Inspector.json
r142281 r142460 3247 3247 }, 3248 3248 { 3249 "domain": "HeapProfiler", 3250 "hidden": true, 3251 "types": [ 3252 { 3253 "id": "ProfileHeader", 3254 "type": "object", 3255 "description": "Profile header.", 3256 "properties": [ 3257 { "name": "title", "type": "string", "description": "Profile title." }, 3258 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." }, 3259 { "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." } 3260 ] 3261 }, 3262 { 3263 "id": "HeapSnapshotObjectId", 3264 "type": "string", 3265 "description": "Heap snashot object id." 3266 } 3267 ], 3268 "commands": [ 3269 { 3270 "name": "hasHeapProfiler", 3271 "returns": [ 3272 { "name": "result", "type": "boolean" } 3273 ] 3274 }, 3275 { 3276 "name": "getProfileHeaders", 3277 "returns": [ 3278 { "name": "headers", "type": "array", "items": { "$ref": "ProfileHeader"} } 3279 ] 3280 }, 3281 { 3282 "name": "getHeapSnapshot", 3283 "parameters": [ 3284 { "name": "uid", "type": "integer" } 3285 ] 3286 }, 3287 { 3288 "name": "removeProfile", 3289 "parameters": [ 3290 { "name": "uid", "type": "integer" } 3291 ] 3292 }, 3293 { 3294 "name": "clearProfiles" 3295 }, 3296 { 3297 "name": "takeHeapSnapshot", 3298 "parameters": [ 3299 { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." } 3300 ] 3301 }, 3302 { 3303 "name": "collectGarbage" 3304 }, 3305 { 3306 "name": "getObjectByHeapObjectId", 3307 "parameters": [ 3308 { "name": "objectId", "$ref": "HeapSnapshotObjectId" }, 3309 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." } 3310 ], 3311 "returns": [ 3312 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." } 3313 ] 3314 }, 3315 { 3316 "name": "getHeapObjectId", 3317 "parameters": [ 3318 { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." } 3319 ], 3320 "returns": [ 3321 { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." } 3322 ] 3323 } 3324 ], 3325 "events": [ 3326 { 3327 "name": "addProfileHeader", 3328 "parameters": [ 3329 { "name": "header", "$ref": "ProfileHeader" } 3330 ] 3331 }, 3332 { 3333 "name": "addHeapSnapshotChunk", 3334 "parameters": [ 3335 { "name": "uid", "type": "integer" }, 3336 { "name": "chunk", "type": "string" } 3337 ] 3338 }, 3339 { 3340 "name": "finishHeapSnapshot", 3341 "parameters": [ 3342 { "name": "uid", "type": "integer" } 3343 ] 3344 }, 3345 { 3346 "name": "resetProfiles" 3347 }, 3348 { 3349 "name": "reportHeapSnapshotProgress", 3350 "parameters": [ 3351 { "name": "done", "type": "integer" }, 3352 { "name": "total", "type": "integer" } 3353 ] 3354 } 3355 ] 3356 }, 3357 { 3249 3358 "domain": "Worker", 3250 3359 "hidden": true, -
trunk/Source/WebCore/inspector/InspectorAllInOne.cpp
r137732 r142460 57 57 #include "InspectorFrontendClientLocal.cpp" 58 58 #include "InspectorFrontendHost.cpp" 59 #include "InspectorHeapProfilerAgent.cpp" 59 60 #include "InspectorHistory.cpp" 60 61 #include "InspectorIndexedDBAgent.cpp" -
trunk/Source/WebCore/inspector/InspectorController.cpp
r142074 r142460 55 55 #include "InspectorFrontend.h" 56 56 #include "InspectorFrontendClient.h" 57 #include "InspectorHeapProfilerAgent.h" 57 58 #include "InspectorIndexedDBAgent.h" 58 59 #include "InspectorInputAgent.h" … … 153 154 m_profilerAgent = profilerAgentPtr.get(); 154 155 m_agents.append(profilerAgentPtr.release()); 156 157 m_agents.append(InspectorHeapProfilerAgent::create(m_instrumentingAgents.get(), m_state.get(), m_injectedScriptManager.get())); 158 155 159 #endif 156 160 -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r141555 r142460 57 57 #include "InspectorDOMStorageAgent.h" 58 58 #include "InspectorDebuggerAgent.h" 59 #include "InspectorHeapProfilerAgent.h" 59 60 #include "InspectorLayerTreeAgent.h" 60 61 #include "InspectorPageAgent.h" … … 925 926 if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent()) 926 927 profilerAgent->resetState(); 928 if (InspectorHeapProfilerAgent* heapProfilerAgent = instrumentingAgents->inspectorHeapProfilerAgent()) 929 heapProfilerAgent->resetState(); 927 930 #endif 928 931 if (InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent()) -
trunk/Source/WebCore/inspector/InstrumentingAgents.h
r140127 r142460 50 50 class InspectorDebuggerAgent; 51 51 class InspectorFileSystemAgent; 52 class InspectorHeapProfilerAgent; 52 53 class InspectorLayerTreeAgent; 53 54 class InspectorPageAgent; … … 128 129 InspectorProfilerAgent* inspectorProfilerAgent() const { return m_inspectorProfilerAgent; } 129 130 void setInspectorProfilerAgent(InspectorProfilerAgent* agent) { m_inspectorProfilerAgent = agent; } 131 132 InspectorHeapProfilerAgent* inspectorHeapProfilerAgent() const { return m_inspectorHeapProfilerAgent; } 133 void setInspectorHeapProfilerAgent(InspectorHeapProfilerAgent* agent) { m_inspectorHeapProfilerAgent = agent; } 130 134 #endif 131 135 … … 171 175 InspectorDOMDebuggerAgent* m_inspectorDOMDebuggerAgent; 172 176 InspectorProfilerAgent* m_inspectorProfilerAgent; 177 InspectorHeapProfilerAgent* m_inspectorHeapProfilerAgent; 173 178 #endif 174 179 #if ENABLE(WORKERS) -
trunk/Source/WebCore/inspector/WorkerInspectorController.cpp
r140127 r142460 42 42 #include "InspectorFrontend.h" 43 43 #include "InspectorFrontendChannel.h" 44 #include "InspectorHeapProfilerAgent.h" 44 45 #include "InspectorProfilerAgent.h" 45 46 #include "InspectorState.h" … … 111 112 112 113 m_agents.append(InspectorProfilerAgent::create(m_instrumentingAgents.get(), consoleAgent.get(), workerContext, m_state.get(), m_injectedScriptManager.get())); 114 m_agents.append(InspectorHeapProfilerAgent::create(m_instrumentingAgents.get(), m_state.get(), m_injectedScriptManager.get())); 113 115 #endif 114 116 m_agents.append(InspectorTimelineAgent::create(m_instrumentingAgents.get(), 0, m_state.get(), InspectorTimelineAgent::WorkerInspector, 0)); -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotDataGrids.js
r138528 r142460 135 135 136 136 /** 137 * @param { ProfilerAgent.HeapSnapshotObjectId} heapSnapshotObjectId137 * @param {HeapProfilerAgent.HeapSnapshotObjectId} heapSnapshotObjectId 138 138 */ 139 139 highlightObjectByHeapSnapshotId: function(heapSnapshotObjectId) … … 529 529 /** 530 530 * @override 531 * @param { ProfilerAgent.HeapSnapshotObjectId} id531 * @param {HeapProfilerAgent.HeapSnapshotObjectId} id 532 532 */ 533 533 highlightObjectByHeapSnapshotId: function(id) … … 735 735 /** 736 736 * @override 737 * @param { ProfilerAgent.HeapSnapshotObjectId} id737 * @param {HeapProfilerAgent.HeapSnapshotObjectId} id 738 738 */ 739 739 highlightObjectByHeapSnapshotId: function(id) -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotGridNodes.js
r140953 r142460 466 466 callback(WebInspector.RemoteObject.fromPrimitiveValue(WebInspector.UIString("Not available"))); 467 467 } 468 ProfilerAgent.getObjectByHeapObjectId(String(this.snapshotNodeId), objectGroupName, formatResult);468 HeapProfilerAgent.getObjectByHeapObjectId(String(this.snapshotNodeId), objectGroupName, formatResult); 469 469 } 470 470 }, -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js
r142243 r142460 802 802 /** 803 803 * @override 804 * @param { ProfilerAgent.ProfileHeader} profile804 * @param {HeapProfilerAgent.ProfileHeader} profile 805 805 * @return {WebInspector.ProfileHeader} 806 806 */ … … 880 880 startSnapshotTransfer: function() 881 881 { 882 ProfilerAgent.getHeapSnapshot(this.uid);882 HeapProfilerAgent.getHeapSnapshot(this.uid); 883 883 }, 884 884 … … 987 987 this._savedChunks = 0; 988 988 this._updateTransferProgress(0, this._totalNumberOfChunks); 989 ProfilerAgent.getHeapSnapshot(this.uid);989 HeapProfilerAgent.getHeapSnapshot(this.uid); 990 990 } 991 991 this._savingToFile = true; -
trunk/Source/WebCore/inspector/front-end/ProfilesPanel.js
r142243 r142460 307 307 308 308 InspectorBackend.registerProfilerDispatcher(new WebInspector.ProfilerDispatcher(this)); 309 InspectorBackend.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatcher(this)); 309 310 InspectorBackend.registerMemoryDispatcher(new WebInspector.MemoryDispatcher(this)); 310 311 … … 468 469 { 469 470 ProfilerAgent.clearProfiles(); 471 HeapProfilerAgent.clearProfiles(); 470 472 this._reset(); 471 473 }, … … 473 475 _garbageCollectButtonClicked: function() 474 476 { 475 ProfilerAgent.collectGarbage();477 HeapProfilerAgent.collectGarbage(); 476 478 }, 477 479 … … 626 628 sidebarParent.removeChild(profile._profilesTreeElement); 627 629 628 if (!profile.isTemporary) 629 ProfilerAgent.removeProfile(profile.profileType().id, profile.uid); 630 if (!profile.isTemporary) { 631 if (profile.profileType().id == WebInspector.HeapSnapshotProfileType.TypeId) 632 HeapProfilerAgent.removeProfile(profile.uid); 633 else 634 ProfilerAgent.removeProfile(profile.profileType().id, profile.uid); 635 } 630 636 631 637 // No other item will be selected if there aren't any other profiles, so … … 685 691 686 692 /** 687 * @param { ProfilerAgent.HeapSnapshotObjectId} snapshotObjectId693 * @param {HeapProfilerAgent.HeapSnapshotObjectId} snapshotObjectId 688 694 * @param {string} viewName 689 695 */ … … 1088 1094 1089 1095 /** 1096 * @param {?string} type 1090 1097 * @param {?string} error 1091 1098 * @param {Array.<ProfilerAgent.ProfileHeader>} profileHeaders 1092 1099 */ 1093 function populateCallback( error, profileHeaders) {1100 function populateCallback(type, error, profileHeaders) { 1094 1101 if (error) 1095 1102 return; … … 1098 1105 for (var i = 0; i < profileHeadersLength; ++i) { 1099 1106 var profileHeader = profileHeaders[i]; 1100 var profileType = this.getProfileType( profileHeader.typeId);1107 var profileType = this.getProfileType(type || profileHeader.typeId); 1101 1108 this.addProfileHeader(profileType.createProfile(profileHeader)); 1102 1109 } 1103 1110 } 1104 1111 1105 ProfilerAgent.getProfileHeaders(populateCallback.bind(this)); 1112 ProfilerAgent.getProfileHeaders(populateCallback.bind(this, null)); 1113 HeapProfilerAgent.getProfileHeaders(populateCallback.bind(this, WebInspector.HeapSnapshotProfileType.TypeId)); 1106 1114 1107 1115 this._profilesWereRequested = true; … … 1165 1173 this._launcherView.profileFinished(); 1166 1174 } 1167 ProfilerAgent.takeHeapSnapshot(true, done.bind(this));1175 HeapProfilerAgent.takeHeapSnapshot(true, done.bind(this)); 1168 1176 WebInspector.userMetrics.ProfilesHeapProfileTaken.record(); 1169 1177 }, … … 1204 1212 function revealInView(viewName) 1205 1213 { 1206 ProfilerAgent.getHeapObjectId(objectId, didReceiveHeapObjectId.bind(this, viewName));1214 HeapProfilerAgent.getHeapObjectId(objectId, didReceiveHeapObjectId.bind(this, viewName)); 1207 1215 } 1208 1216 … … 1294 1302 { 1295 1303 this._profilesPanel.setRecordingProfile(WebInspector.CPUProfileType.TypeId, isProfiling); 1304 }, 1305 1306 /** 1307 * @override 1308 */ 1309 resetProfiles: function() 1310 { 1311 this._profilesPanel._reset(); 1312 }, 1313 1314 /** 1315 * @override 1316 * @param {number} done 1317 * @param {number} total 1318 */ 1319 reportHeapSnapshotProgress: function(done, total) 1320 { 1321 this._profilesPanel._reportHeapSnapshotProgress(done, total); 1322 } 1323 } 1324 1325 /** 1326 * @constructor 1327 * @implements {HeapProfilerAgent.Dispatcher} 1328 * @param {WebInspector.ProfilesPanel} profilesPanel 1329 */ 1330 WebInspector.HeapProfilerDispatcher = function(profilesPanel) 1331 { 1332 this._profilesPanel = profilesPanel; 1333 } 1334 1335 WebInspector.HeapProfilerDispatcher.prototype = { 1336 /** 1337 * @param {HeapProfilerAgent.ProfileHeader} profile 1338 */ 1339 addProfileHeader: function(profile) 1340 { 1341 var profileType = this._profilesPanel.getProfileType(WebInspector.HeapSnapshotProfileType.TypeId); 1342 this._profilesPanel.addProfileHeader(profileType.createProfile(profile)); 1343 }, 1344 1345 /** 1346 * @override 1347 * @param {number} uid 1348 * @param {string} chunk 1349 */ 1350 addHeapSnapshotChunk: function(uid, chunk) 1351 { 1352 this._profilesPanel._addHeapSnapshotChunk(uid, chunk); 1353 }, 1354 1355 /** 1356 * @override 1357 * @param {number} uid 1358 */ 1359 finishHeapSnapshot: function(uid) 1360 { 1361 this._profilesPanel._finishHeapSnapshot(uid); 1296 1362 }, 1297 1363 -
trunk/Source/WebCore/inspector/front-end/TimelinePanel.js
r138564 r142460 581 581 _garbageCollectButtonClicked: function() 582 582 { 583 ProfilerAgent.collectGarbage();583 HeapProfilerAgent.collectGarbage(); 584 584 }, 585 585 -
trunk/Source/WebCore/inspector/front-end/inspector.js
r142445 r142460 369 369 ProfilerAgent.causesRecompilation(WebInspector._initializeCapability.bind(WebInspector, "profilerCausesRecompilation", null)); 370 370 ProfilerAgent.isSampling(WebInspector._initializeCapability.bind(WebInspector, "samplingCPUProfiler", null)); 371 ProfilerAgent.hasHeapProfiler(WebInspector._initializeCapability.bind(WebInspector, "heapProfilerPresent", null));371 HeapProfilerAgent.hasHeapProfiler(WebInspector._initializeCapability.bind(WebInspector, "heapProfilerPresent", null)); 372 372 TimelineAgent.supportsFrameInstrumentation(WebInspector._initializeCapability.bind(WebInspector, "timelineSupportsFrameInstrumentation", null)); 373 373 TimelineAgent.canMonitorMainThread(WebInspector._initializeCapability.bind(WebInspector, "timelineCanMonitorMainThread", null)); -
trunk/Source/WebKit/chromium/ChangeLog
r142434 r142460 1 2013-02-11 Alexei Filippov <alph@chromium.org> 2 3 Web Inspector: Split Profiler domain in protocol into Profiler and HeapProfiler 4 https://bugs.webkit.org/show_bug.cgi?id=108653 5 6 Reviewed by Yury Semikhatsky. 7 8 Currently CPU and heap profilers share the same domain 'Profiler' in the protocol. 9 In fact these two profile types have not too much in common. So put each into its own domain. 10 It should also help when Profiles panel gets split into several tools. 11 This is the phase 1 which adds InspectorHeapProfilerAgent but doesn't 12 change the original InspectorProfilerAgent. 13 14 * src/WebDevToolsAgentImpl.cpp: 15 (WebKit::WebDevToolsAgent::shouldInterruptForMessage): 16 1 17 2013-02-11 Abhishek Arya <inferno@chromium.org> 2 18 -
trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
r141555 r142460 779 779 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kProfiler_stopCmd] 780 780 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kProfiler_getCPUProfileCmd] 781 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::k Profiler_getHeapSnapshotCmd];781 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kHeapProfiler_getHeapSnapshotCmd]; 782 782 } 783 783
Note: See TracChangeset
for help on using the changeset viewer.