Changeset 139998 in webkit
- Timestamp:
- Jan 17, 2013 10:50:59 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r139995 r139998 1 2013-01-17 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Profiler: split "getProfile" to "getCPUProfile" and "loadHeapSnapshot" 4 https://bugs.webkit.org/show_bug.cgi?id=104545 5 6 Reviewed by Yury Semikhatsky. 7 8 Adopted new method signatures. 9 10 * inspector/profiler/heap-snapshot-get-profile-crash.html: 11 Adopted new method signatures. 12 * inspector/profiler/heap-snapshot-loader.html: Ditto. 13 * inspector/profiler/heap-snapshot-test.js: Ditto. 14 1 15 2013-01-17 Krzysztof Czech <k.czech@samsung.com> 2 16 -
trunk/LayoutTests/inspector/profiler/heap-snapshot-get-profile-crash.html
r120456 r139998 15 15 next(); 16 16 } 17 ProfilerAgent.get Profile("HEAP",-1, finish);17 ProfilerAgent.getHeapSnapshot(-1, finish); 18 18 } 19 19 ]); -
trunk/LayoutTests/inspector/profiler/heap-snapshot-loader.html
r138477 r139998 31 31 var profileHeader = panel._profiles[0]; 32 32 33 function get ProfileMock(profileTypeName,uid) {33 function getHeapSnapshotMock(uid) { 34 34 for (var i = 0, l = sourceStringified.length; i < l; i += partSize) 35 35 dispatcher.addHeapSnapshotChunk(uid, sourceStringified.slice(i, i + partSize)); … … 40 40 { 41 41 if (overrideGetProfile) 42 InspectorTest.override(ProfilerAgent, "get Profile", getProfileMock);42 InspectorTest.override(ProfilerAgent, "getHeapSnapshot", getHeapSnapshotMock); 43 43 callback(profileHeader); 44 44 } 45 45 InspectorTest.addSniffer(profileHeader, "_snapshotReceived", snapshotLoaded); 46 46 47 InspectorTest.override(ProfilerAgent, "get Profile", getProfileMock);47 InspectorTest.override(ProfilerAgent, "getHeapSnapshot", getHeapSnapshotMock); 48 48 panel.showProfile(profileHeader); 49 49 } -
trunk/LayoutTests/inspector/profiler/heap-snapshot-test.js
r138477 r139998 728 728 }); 729 729 delete snapshot.maxJSObjectId; 730 function pushGeneratedSnapshot( typeId,uid)731 { 732 snapshot.snapshot.typeId = profile.typeId;730 function pushGeneratedSnapshot(uid) 731 { 732 snapshot.snapshot.typeId = "HEAP"; 733 733 snapshot.snapshot.title = profile.title; 734 734 snapshot.snapshot.uid = profile.uid; … … 736 736 WebInspector.panels.profiles._finishHeapSnapshot(uid); 737 737 } 738 InspectorTest.override(ProfilerAgent, "get Profile", pushGeneratedSnapshot);738 InspectorTest.override(ProfilerAgent, "getHeapSnapshot", pushGeneratedSnapshot); 739 739 InspectorTest._takeAndOpenSnapshotCallback = callback; 740 740 WebInspector.panels.profiles.addProfileHeader(profile); -
trunk/Source/WebCore/ChangeLog
r139997 r139998 1 2013-01-17 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Profiler: split "getProfile" to "getCPUProfile" and "loadHeapSnapshot" 4 https://bugs.webkit.org/show_bug.cgi?id=104545 5 6 Reviewed by Yury Semikhatsky. 7 8 This change will allow stronger typing of profiler output. 9 10 * inspector/Inspector.json: 11 Split "getProfile" to "getCPUProfile" and "getHeapSnapshot". 12 * inspector/InspectorProfilerAgent.cpp: Ditto. 13 * inspector/InspectorProfilerAgent.h: Ditto. 14 * inspector/front-end/CPUProfileView.js: Adopd changes. 15 * inspector/front-end/HeapSnapshotView.js: Ditto. 16 1 17 2013-01-17 Eugene Klyuchnikov <eustas@chromium.org> 2 18 -
trunk/Source/WebCore/inspector/Inspector.json
r139917 r139998 2985 2985 }, 2986 2986 { 2987 "id": " Profile",2987 "id": "CPUProfile", 2988 2988 "type": "object", 2989 2989 "description": "Profile.", … … 3038 3038 }, 3039 3039 { 3040 "name": "getProfile", 3041 "parameters": [ 3042 { "name": "type", "type": "string" }, 3040 "name": "getCPUProfile", 3041 "parameters": [ 3043 3042 { "name": "uid", "type": "integer" } 3044 3043 ], 3045 3044 "returns": [ 3046 { "name": "profile", "$ref": "Profile" } 3045 { "name": "profile", "$ref": "CPUProfile" } 3046 ] 3047 }, 3048 { 3049 "name": "getHeapSnapshot", 3050 "parameters": [ 3051 { "name": "uid", "type": "integer" } 3047 3052 ] 3048 3053 }, -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp
r139589 r139998 285 285 } // namespace 286 286 287 void InspectorProfilerAgent::get Profile(ErrorString* errorString, const String& type, int rawUid, RefPtr<TypeBuilder::Profiler::Profile>& profileObject)287 void InspectorProfilerAgent::getCPUProfile(ErrorString* errorString, int rawUid, RefPtr<TypeBuilder::Profiler::CPUProfile>& profileObject) 288 288 { 289 289 unsigned uid = static_cast<unsigned>(rawUid); 290 if (type == CPUProfileType) { 291 ProfilesMap::iterator it = m_profiles.find(uid); 292 if (it == m_profiles.end()) { 293 *errorString = "Profile wasn't found"; 294 return; 295 } 296 profileObject = TypeBuilder::Profiler::Profile::create(); 297 profileObject->setHead(it->value->buildInspectorObjectForHead()); 298 if (it->value->bottomUpHead()) 299 profileObject->setBottomUpHead(it->value->buildInspectorObjectForBottomUpHead()); 300 profileObject->setIdleTime(it->value->idleTime()); 301 } else if (type == HeapProfileType) { 302 HeapSnapshotsMap::iterator it = m_snapshots.find(uid); 303 if (it == m_snapshots.end()) { 304 *errorString = "Profile wasn't found"; 305 return; 306 } 307 RefPtr<ScriptHeapSnapshot> snapshot = it->value; 308 profileObject = TypeBuilder::Profiler::Profile::create(); 309 if (m_frontend) { 310 OutputStream stream(m_frontend, uid); 311 snapshot->writeJSON(&stream); 312 } 290 ProfilesMap::iterator it = m_profiles.find(uid); 291 if (it == m_profiles.end()) { 292 *errorString = "Profile wasn't found"; 293 return; 294 } 295 profileObject = TypeBuilder::Profiler::CPUProfile::create(); 296 profileObject->setHead(it->value->buildInspectorObjectForHead()); 297 if (it->value->bottomUpHead()) 298 profileObject->setBottomUpHead(it->value->buildInspectorObjectForBottomUpHead()); 299 profileObject->setIdleTime(it->value->idleTime()); 300 } 301 302 void InspectorProfilerAgent::getHeapSnapshot(ErrorString* errorString, int rawUid) 303 { 304 unsigned uid = static_cast<unsigned>(rawUid); 305 HeapSnapshotsMap::iterator it = m_snapshots.find(uid); 306 if (it == m_snapshots.end()) { 307 *errorString = "Profile wasn't found"; 308 return; 309 } 310 RefPtr<ScriptHeapSnapshot> snapshot = it->value; 311 if (m_frontend) { 312 OutputStream stream(m_frontend, uid); 313 snapshot->writeJSON(&stream); 313 314 } 314 315 } -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.h
r138457 r139998 88 88 String getCurrentUserInitiatedProfileName(bool incrementProfileNumber = false); 89 89 virtual void getProfileHeaders(ErrorString*, RefPtr<TypeBuilder::Array<TypeBuilder::Profiler::ProfileHeader> >&); 90 virtual void getProfile(ErrorString*, const String& type, int uid, RefPtr<TypeBuilder::Profiler::Profile>&); 90 virtual void getCPUProfile(ErrorString*, int uid, RefPtr<TypeBuilder::Profiler::CPUProfile>&); 91 virtual void getHeapSnapshot(ErrorString*, int uid); 91 92 virtual void removeProfile(ErrorString*, const String& type, int uid); 92 93 -
trunk/Source/WebCore/inspector/front-end/CPUProfileView.js
r139972 r139998 99 99 this._linkifier = new WebInspector.Linkifier(new WebInspector.Linkifier.DefaultFormatter(30)); 100 100 101 ProfilerAgent.get Profile(this.profile.profileType().id,this.profile.uid, profileCallback.bind(this));101 ProfilerAgent.getCPUProfile(this.profile.uid, profileCallback.bind(this)); 102 102 } 103 103 -
trunk/Source/WebCore/inspector/front-end/HeapSnapshotView.js
r135708 r139998 873 873 this.sidebarElement.subtitle = WebInspector.UIString("Loading\u2026"); 874 874 this.sidebarElement.wait = true; 875 ProfilerAgent.get Profile(this.profileType().id,this.uid);875 ProfilerAgent.getHeapSnapshot(this.uid); 876 876 } 877 877 var loaderProxy = /** @type {WebInspector.HeapSnapshotLoaderProxy} */ (this._receiver); … … 978 978 this._savedChunks = 0; 979 979 this._updateTransferProgress(0, this._totalNumberOfChunks); 980 ProfilerAgent.get Profile(this.profileType().id,this.uid);980 ProfilerAgent.getHeapSnapshot(this.uid); 981 981 } 982 982 this._savingToFile = true; -
trunk/Source/WebKit/chromium/ChangeLog
r139976 r139998 1 2013-01-17 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Profiler: split "getProfile" to "getCPUProfile" and "loadHeapSnapshot" 4 https://bugs.webkit.org/show_bug.cgi?id=104545 5 6 Reviewed by Yury Semikhatsky. 7 8 Adopt changes: mimic old behavior. 9 10 * src/WebDevToolsAgentImpl.cpp: Adopt signature changes. 11 1 12 2013-01-17 Yury Semikhatsky <yurys@chromium.org> 2 13 -
trunk/Source/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
r139976 r139998 750 750 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kProfiler_startCmd] 751 751 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kProfiler_stopCmd] 752 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kProfiler_getProfileCmd]; 752 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kProfiler_getCPUProfileCmd] 753 || commandName == InspectorBackendDispatcher::commandNames[InspectorBackendDispatcher::kProfiler_getHeapSnapshotCmd]; 753 754 } 754 755 -
trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js
r100457 r139998 69 69 70 70 var ProfilerAgent = { 71 get Profile: function(typeId,uid, callback) {71 getCPUProfile: function(uid, callback) { 72 72 this._callback = callback; 73 }, 74 75 getHeapSnapshot: function(uid, callback) { 73 76 }, 74 77 -
trunk/Tools/ChangeLog
r139973 r139998 1 2013-01-17 Eugene Klyuchnikov <eustas@chromium.org> 2 3 Web Inspector: Profiler: split "getProfile" to "getCPUProfile" and "loadHeapSnapshot" 4 https://bugs.webkit.org/show_bug.cgi?id=104545 5 6 Reviewed by Yury Semikhatsky. 7 8 Adopt signature changes. 9 10 * BuildSlaveSupport/build.webkit.org-config/public_html/LeaksViewer/WebInspectorShims.js: 11 (ProfilerAgent.getCPUProfile): Renamed. 12 (ProfilerAgent.getHeapSnapshot): Added. 13 1 14 2013-01-17 Zan Dobersek <zdobersek@igalia.com> 2 15
Note: See TracChangeset
for help on using the changeset viewer.