Changeset 166622 in webkit
- Timestamp:
- Apr 1, 2014 4:20:06 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 deleted
- 27 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r166595 r166622 1 2014-04-01 Timothy Hatcher <timothy@apple.com> 2 3 Remove HeapProfiler from the Web Inspector protocol. 4 5 https://bugs.webkit.org/show_bug.cgi?id=131070 6 7 Reviewed by Joseph Pecoraro. 8 9 * inspector/agents/InspectorConsoleAgent.h: 10 * inspector/agents/JSGlobalObjectConsoleAgent.cpp: 11 (Inspector::JSGlobalObjectConsoleAgent::addInspectedHeapObject): Deleted. 12 * inspector/agents/JSGlobalObjectConsoleAgent.h: 13 * inspector/protocol/Console.json: 14 1 15 2014-03-31 Simon Fraser <simon.fraser@apple.com> 2 16 -
trunk/Source/JavaScriptCore/inspector/agents/InspectorConsoleAgent.h
r165199 r166622 66 66 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) = 0; 67 67 virtual void addInspectedNode(ErrorString*, int nodeId) = 0; 68 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId) = 0;69 68 70 69 virtual bool isWorkerAgent() const = 0; -
trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectConsoleAgent.cpp
r163568 r166622 46 46 } 47 47 48 void JSGlobalObjectConsoleAgent::addInspectedHeapObject(ErrorString* errorString, int)49 {50 *errorString = ASCIILiteral("Not supported for JavaScript context");51 }52 53 48 } // namespace Inspector 54 49 -
trunk/Source/JavaScriptCore/inspector/agents/JSGlobalObjectConsoleAgent.h
r163988 r166622 44 44 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) override; 45 45 virtual void addInspectedNode(ErrorString*, int nodeId) override; 46 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId) override;47 46 48 47 virtual bool isWorkerAgent() const override { return false; } -
trunk/Source/JavaScriptCore/inspector/protocol/Console.json
r163568 r166622 75 75 ], 76 76 "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)." 77 },78 {79 "name": "addInspectedHeapObject",80 "parameters": [81 { "name": "heapObjectId", "type": "integer" }82 ]83 77 } 84 78 ], -
trunk/Source/WebCore/CMakeLists.txt
r166616 r166622 762 762 ${WEBCORE_DIR}/inspector/protocol/DOMDebugger.json 763 763 ${WEBCORE_DIR}/inspector/protocol/DOMStorage.json 764 ${WEBCORE_DIR}/inspector/protocol/HeapProfiler.json765 764 ${WEBCORE_DIR}/inspector/protocol/IndexedDB.json 766 765 ${WEBCORE_DIR}/inspector/protocol/Input.json … … 1577 1576 inspector/InspectorFrontendClientLocal.cpp 1578 1577 inspector/InspectorFrontendHost.cpp 1579 inspector/InspectorHeapProfilerAgent.cpp1580 1578 inspector/InspectorHistory.cpp 1581 1579 inspector/InspectorIndexedDBAgent.cpp -
trunk/Source/WebCore/ChangeLog
r166618 r166622 1 2014-04-01 Timothy Hatcher <timothy@apple.com> 2 3 Remove HeapProfiler from the Web Inspector protocol. 4 5 https://bugs.webkit.org/show_bug.cgi?id=131070 6 7 Reviewed by Joseph Pecoraro. 8 9 * CMakeLists.txt: 10 * DerivedSources.make: 11 * WebCore.vcxproj/WebCore.vcxproj: 12 * WebCore.vcxproj/WebCore.vcxproj.filters: 13 * WebCore.xcodeproj/project.pbxproj: 14 * bindings/js/ScriptHeapSnapshot.h: Removed. 15 * bindings/js/ScriptProfiler.h: 16 (WebCore::ScriptProfiler::takeHeapSnapshot): Deleted. 17 (WebCore::ScriptProfiler::isSampling): Deleted. 18 (WebCore::ScriptProfiler::hasHeapProfiler): Deleted. 19 * inspector/InspectorAllInOne.cpp: 20 * inspector/InspectorController.cpp: 21 (WebCore::InspectorController::InspectorController): 22 * inspector/InspectorHeapProfilerAgent.cpp: Removed. 23 * inspector/InspectorHeapProfilerAgent.h: Removed. 24 * inspector/InspectorInstrumentation.cpp: 25 (WebCore::InspectorInstrumentation::didCommitLoadImpl): 26 * inspector/InspectorProfilerAgent.cpp: 27 (WebCore::InspectorProfilerAgent::InspectorProfilerAgent): 28 (WebCore::InspectorProfilerAgent::getProfileHeaders): 29 (WebCore::InspectorProfilerAgent::removeProfile): 30 (WebCore::InspectorProfilerAgent::resetState): The CommandLineAPIHost call to 31 clear inspected objects should have not been here. It was only needed by the 32 HeapProfilerAgent. 33 (WebCore::InspectorProfilerAgent::resetFrontendProfiles): 34 (WebCore::InspectorProfilerAgent::collectGarbage): Deleted. 35 (WebCore::InspectorProfilerAgent::createSnapshotHeader): Deleted. 36 (WebCore::InspectorProfilerAgent::isSampling): Deleted. 37 (WebCore::InspectorProfilerAgent::hasHeapProfiler): Deleted. 38 (WebCore::InspectorProfilerAgent::getHeapSnapshot): Deleted. 39 (WebCore::InspectorProfilerAgent::takeHeapSnapshot): Deleted. 40 (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId): Deleted. 41 (WebCore::InspectorProfilerAgent::getHeapObjectId): Deleted. 42 * inspector/InspectorProfilerAgent.h: 43 * inspector/InstrumentingAgents.h: 44 (WebCore::InstrumentingAgents::inspectorHeapProfilerAgent): Deleted. 45 (WebCore::InstrumentingAgents::setInspectorHeapProfilerAgent): Deleted. 46 * inspector/WebConsoleAgent.cpp: 47 (WebCore::WebConsoleAgent::addInspectedHeapObject): Deleted. 48 * inspector/WebConsoleAgent.h: 49 * inspector/WorkerInspectorController.cpp: 50 (WebCore::WorkerInspectorController::WorkerInspectorController): 51 * inspector/protocol/HeapProfiler.json: Removed. 52 * inspector/protocol/Profiler.json: 53 1 54 2014-04-01 Zoltan Horvath <zoltan@webkit.org> 2 55 -
trunk/Source/WebCore/DerivedSources.make
r166616 r166622 1121 1121 $(WebCore)/inspector/protocol/DOMDebugger.json \ 1122 1122 $(WebCore)/inspector/protocol/DOMStorage.json \ 1123 $(WebCore)/inspector/protocol/HeapProfiler.json \1124 1123 $(WebCore)/inspector/protocol/Input.json \ 1125 1124 $(WebCore)/inspector/protocol/LayerTree.json \ -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj
r166542 r166622 17795 17795 </ClCompile> 17796 17796 <ClCompile Include="..\inspector\InspectorFrontendHost.cpp"> 17797 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>17798 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>17799 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|Win32'">true</ExcludedFromBuild>17800 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release_WinCairo|x64'">true</ExcludedFromBuild>17801 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|Win32'">true</ExcludedFromBuild>17802 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Production|x64'">true</ExcludedFromBuild>17803 </ClCompile>17804 <ClCompile Include="..\inspector\InspectorHeapProfilerAgent.cpp">17805 17797 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild> 17806 17798 <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild> … … 21077 21069 <ClInclude Include="..\inspector\InspectorFrontendClientLocal.h" /> 21078 21070 <ClInclude Include="..\inspector\InspectorFrontendHost.h" /> 21079 <ClInclude Include="..\inspector\InspectorHeapProfilerAgent.h" />21080 21071 <ClInclude Include="..\inspector\InspectorHistory.h" /> 21081 21072 <ClInclude Include="..\inspector\InspectorIndexedDBAgent.h" /> -
trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters
r166506 r166622 4774 4774 <Filter>inspector</Filter> 4775 4775 </ClCompile> 4776 <ClCompile Include="..\inspector\InspectorHeapProfilerAgent.cpp">4777 <Filter>inspector</Filter>4778 </ClCompile>4779 4776 <ClCompile Include="..\inspector\InspectorHistory.cpp"> 4780 4777 <Filter>inspector</Filter> … … 12390 12387 </ClInclude> 12391 12388 <ClInclude Include="..\inspector\InspectorFrontendHost.h"> 12392 <Filter>inspector</Filter>12393 </ClInclude>12394 <ClInclude Include="..\inspector\InspectorHeapProfilerAgent.h">12395 12389 <Filter>inspector</Filter> 12396 12390 </ClInclude> -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r166599 r166622 1765 1765 510D4A37103165EE0049EA54 /* SocketStreamHandleBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A31103165EE0049EA54 /* SocketStreamHandleBase.h */; }; 1766 1766 510D4A38103165EE0049EA54 /* SocketStreamHandleClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 510D4A32103165EE0049EA54 /* SocketStreamHandleClient.h */; }; 1767 5112935F3D54B4B52FAF973F /* InspectorHeapProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */; };1768 511293603D60B4B52FAF973F /* InspectorHeapProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */; };1769 1767 511EC1A6188DACA400BA3EB6 /* IDBKeyData.h in Headers */ = {isa = PBXBuildFile; fileRef = 511EC1A5188DACA400BA3EB6 /* IDBKeyData.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1770 1768 511EC1A8188DAE7B00BA3EB6 /* IDBKeyData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 511EC1A7188DAE7B00BA3EB6 /* IDBKeyData.cpp */; }; … … 3586 3584 9F0D6B2E121BFEBA006C0288 /* InspectorProfilerAgent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */; }; 3587 3585 9F0D6B2F121BFEBA006C0288 /* InspectorProfilerAgent.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */; }; 3588 9F3B947E12241758005304E7 /* ScriptHeapSnapshot.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */; };3589 3586 9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304C11184B4100AD0126 /* ScriptProfile.h */; settings = {ATTRIBUTES = (Private, ); }; }; 3590 3587 9F72305011184B4100AD0126 /* ScriptProfiler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9F72304D11184B4100AD0126 /* ScriptProfiler.cpp */; }; … … 8737 8734 510D4A31103165EE0049EA54 /* SocketStreamHandleBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamHandleBase.h; sourceTree = "<group>"; }; 8738 8735 510D4A32103165EE0049EA54 /* SocketStreamHandleClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SocketStreamHandleClient.h; sourceTree = "<group>"; }; 8739 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorHeapProfilerAgent.cpp; sourceTree = "<group>"; };8740 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorHeapProfilerAgent.h; sourceTree = "<group>"; };8741 8736 511EC1A5188DACA400BA3EB6 /* IDBKeyData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IDBKeyData.h; sourceTree = "<group>"; }; 8742 8737 511EC1A7188DAE7B00BA3EB6 /* IDBKeyData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IDBKeyData.cpp; sourceTree = "<group>"; }; … … 10633 10628 9F0D6B2C121BFEBA006C0288 /* InspectorProfilerAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorProfilerAgent.cpp; sourceTree = "<group>"; }; 10634 10629 9F0D6B2D121BFEBA006C0288 /* InspectorProfilerAgent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorProfilerAgent.h; sourceTree = "<group>"; }; 10635 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptHeapSnapshot.h; sourceTree = "<group>"; };10636 10630 9F72304C11184B4100AD0126 /* ScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfile.h; sourceTree = "<group>"; }; 10637 10631 9F72304D11184B4100AD0126 /* ScriptProfiler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptProfiler.cpp; sourceTree = "<group>"; }; … … 14985 14979 7A0E770C10C00A8800A0276E /* InspectorFrontendHost.h */, 14986 14980 7A0E770D10C00A8800A0276E /* InspectorFrontendHost.idl */, 14987 511293613D6DB4B52FAF973F /* InspectorHeapProfilerAgent.cpp */,14988 511293623D85B4B52FAF973F /* InspectorHeapProfilerAgent.h */,14989 14981 7A54857D14E02D51006AE05A /* InspectorHistory.cpp */, 14990 14982 7A54857E14E02D51006AE05A /* InspectorHistory.h */, … … 20422 20414 41F066E30F64BCF600A07EAC /* ScriptGlobalObject.cpp */, 20423 20415 41F066E20F64BCF600A07EAC /* ScriptGlobalObject.h */, 20424 9F3B947D12241758005304E7 /* ScriptHeapSnapshot.h */,20425 20416 F33F0281120947F200E5743A /* ScriptProfile.cpp */, 20426 20417 9F72304C11184B4100AD0126 /* ScriptProfile.h */, … … 24197 24188 F344C75311294D9D00F26EEE /* InspectorFrontendClientLocal.h in Headers */, 24198 24189 7A0E770F10C00A8800A0276E /* InspectorFrontendHost.h in Headers */, 24199 511293603D60B4B52FAF973F /* InspectorHeapProfilerAgent.h in Headers */,24200 24190 7A54858014E02D51006AE05A /* InspectorHistory.h in Headers */, 24201 24191 7ACD88D414C08BD60084EDD2 /* InspectorIndexedDBAgent.h in Headers */, … … 25412 25402 41F066E40F64BCF600A07EAC /* ScriptGlobalObject.h in Headers */, 25413 25403 07AB996B18DA3C010018771E /* RTCIceServer.h in Headers */, 25414 9F3B947E12241758005304E7 /* ScriptHeapSnapshot.h in Headers */,25415 25404 FD31603612B0267600C1A359 /* ScriptProcessorNode.h in Headers */, 25416 25405 9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */, … … 27583 27572 F344C75811294FF600F26EEE /* InspectorFrontendClientLocal.cpp in Sources */, 27584 27573 7A0E770E10C00A8800A0276E /* InspectorFrontendHost.cpp in Sources */, 27585 5112935F3D54B4B52FAF973F /* InspectorHeapProfilerAgent.cpp in Sources */,27586 27574 7A54857F14E02D51006AE05A /* InspectorHistory.cpp in Sources */, 27587 27575 7ACD88D314C08BD60084EDD2 /* InspectorIndexedDBAgent.cpp in Sources */, -
trunk/Source/WebCore/bindings/js/ScriptProfiler.h
r165676 r166622 28 28 #define ScriptProfiler_h 29 29 30 #include "ScriptHeapSnapshot.h"31 30 #include "ScriptProfile.h" 32 31 #include "ScriptState.h" … … 65 64 static PassRefPtr<ScriptProfile> stopForPage(Page*, const String& title); 66 65 static PassRefPtr<ScriptProfile> stopForWorkerGlobalScope(WorkerGlobalScope*, const String& title); 67 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String&, HeapSnapshotProgress*) { return 0; }68 static bool isSampling() { return false; }69 static bool hasHeapProfiler() { return false; }70 66 static HashMap<String, double>* currentProfileNameIdleTimeMap() { return 0; } 71 67 }; -
trunk/Source/WebCore/inspector/InspectorAllInOne.cpp
r165676 r166622 41 41 #include "InspectorFrontendClientLocal.cpp" 42 42 #include "InspectorFrontendHost.cpp" 43 #include "InspectorHeapProfilerAgent.cpp"44 43 #include "InspectorHistory.cpp" 45 44 #include "InspectorIndexedDBAgent.cpp" -
trunk/Source/WebCore/inspector/InspectorController.cpp
r166257 r166622 46 46 #include "InspectorDatabaseAgent.h" 47 47 #include "InspectorFrontendClient.h" 48 #include "InspectorHeapProfilerAgent.h"49 48 #include "InspectorIndexedDBAgent.h" 50 49 #include "InspectorInputAgent.h" … … 159 158 m_agents.append(std::move(profilerAgentPtr)); 160 159 161 m_agents.append(std::make_unique<InspectorHeapProfilerAgent>(m_instrumentingAgents.get(), m_injectedScriptManager.get()));162 163 160 m_agents.append(std::make_unique<InspectorWorkerAgent>(m_instrumentingAgents.get())); 164 161 -
trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp
r165981 r166622 49 49 #include "InspectorDOMStorageAgent.h" 50 50 #include "InspectorDatabaseAgent.h" 51 #include "InspectorHeapProfilerAgent.h"52 51 #include "InspectorLayerTreeAgent.h" 53 52 #include "InspectorPageAgent.h" … … 769 768 if (InspectorProfilerAgent* profilerAgent = instrumentingAgents->inspectorProfilerAgent()) 770 769 profilerAgent->resetState(); 771 if (InspectorHeapProfilerAgent* heapProfilerAgent = instrumentingAgents->inspectorHeapProfilerAgent())772 heapProfilerAgent->resetState();773 770 if (InspectorCSSAgent* cssAgent = instrumentingAgents->inspectorCSSAgent()) 774 771 cssAgent->reset(); -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.cpp
r165676 r166622 33 33 #if ENABLE(INSPECTOR) 34 34 35 #include "CommandLineAPIHost.h"36 35 #include "InspectorWebFrontendDispatchers.h" 37 36 #include "InstrumentingAgents.h" 38 37 #include "Page.h" 39 38 #include "PageScriptDebugServer.h" 40 #include "ScriptHeapSnapshot.h"41 39 #include "ScriptProfile.h" 42 40 #include "ScriptProfiler.h" … … 58 56 static const char* const UserInitiatedProfileName = "org.webkit.profiles.user-initiated"; 59 57 static const char* const CPUProfileType = "CPU"; 60 static const char* const HeapProfileType = "HEAP";61 62 58 63 59 class PageProfilerAgent : public InspectorProfilerAgent { … … 127 123 , m_currentUserInitiatedProfileNumber(-1) 128 124 , m_nextUserInitiatedProfileNumber(1) 129 , m_nextUserInitiatedHeapSnapshotNumber(1)130 125 , m_profileNameIdleTimeMap(ScriptProfiler::currentProfileNameIdleTimeMap()) 131 126 { … … 163 158 } 164 159 165 void InspectorProfilerAgent::collectGarbage(WebCore::ErrorString*)166 {167 ScriptProfiler::collectGarbage();168 }169 170 160 PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> InspectorProfilerAgent::createProfileHeader(const ScriptProfile& profile) 171 161 { … … 177 167 } 178 168 179 PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> InspectorProfilerAgent::createSnapshotHeader(const ScriptHeapSnapshot& snapshot)180 {181 RefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> header = Inspector::TypeBuilder::Profiler::ProfileHeader::create()182 .setTypeId(Inspector::TypeBuilder::Profiler::ProfileHeader::TypeId::HEAP)183 .setUid(snapshot.uid())184 .setTitle(snapshot.title());185 return header.release();186 }187 188 void InspectorProfilerAgent::isSampling(ErrorString*, bool* result)189 {190 *result = ScriptProfiler::isSampling();191 }192 193 void InspectorProfilerAgent::hasHeapProfiler(ErrorString*, bool* result)194 {195 *result = ScriptProfiler::hasHeapProfiler();196 }197 198 169 void InspectorProfilerAgent::enable(ErrorString*) 199 170 { … … 241 212 for (ProfilesMap::iterator it = m_profiles.begin(); it != profilesEnd; ++it) 242 213 headers->addItem(createProfileHeader(*it->value)); 243 HeapSnapshotsMap::iterator snapshotsEnd = m_snapshots.end(); 244 for (HeapSnapshotsMap::iterator it = m_snapshots.begin(); it != snapshotsEnd; ++it) 245 headers->addItem(createSnapshotHeader(*it->value)); 246 } 247 248 namespace { 249 250 class OutputStream : public ScriptHeapSnapshot::OutputStream { 251 public: 252 OutputStream(InspectorProfilerFrontendDispatcher* frontend, unsigned uid) 253 : m_frontendDispatcher(frontend), m_uid(uid) { } 254 void Write(const String& chunk) override { m_frontendDispatcher->addHeapSnapshotChunk(m_uid, chunk); } 255 void Close() override { m_frontendDispatcher->finishHeapSnapshot(m_uid); } 256 private: 257 InspectorProfilerFrontendDispatcher* m_frontendDispatcher; 258 int m_uid; 259 }; 260 261 } // namespace 214 } 262 215 263 216 void InspectorProfilerAgent::getCPUProfile(ErrorString* errorString, int rawUid, RefPtr<Inspector::TypeBuilder::Profiler::CPUProfile>& profileObject) … … 273 226 } 274 227 275 void InspectorProfilerAgent::getHeapSnapshot(ErrorString* errorString, int rawUid)276 {277 unsigned uid = static_cast<unsigned>(rawUid);278 HeapSnapshotsMap::iterator it = m_snapshots.find(uid);279 if (it == m_snapshots.end()) {280 *errorString = "Profile wasn't found";281 return;282 }283 RefPtr<ScriptHeapSnapshot> snapshot = it->value;284 if (m_frontendDispatcher) {285 OutputStream stream(m_frontendDispatcher.get(), uid);286 snapshot->writeJSON(&stream);287 }288 }289 290 228 void InspectorProfilerAgent::removeProfile(ErrorString*, const String& type, int rawUid) 291 229 { … … 293 231 if (type == CPUProfileType) 294 232 m_profiles.remove(uid); 295 else if (type == HeapProfileType)296 m_snapshots.remove(uid);297 233 } 298 234 … … 301 237 stop(); 302 238 m_profiles.clear(); 303 m_snapshots.clear();304 239 m_currentUserInitiatedProfileNumber = 1; 305 240 m_nextUserInitiatedProfileNumber = 1; 306 m_nextUserInitiatedHeapSnapshotNumber = 1;307 241 resetFrontendProfiles(); 308 309 if (CommandLineAPIHost* commandLineAPIHost = m_injectedScriptManager->commandLineAPIHost())310 commandLineAPIHost->clearInspectedObjects();311 242 } 312 243 … … 317 248 if (!m_profileHeadersRequested) 318 249 return; 319 if (m_profiles.isEmpty() && m_snapshots.isEmpty())250 if (m_profiles.isEmpty()) 320 251 m_frontendDispatcher->resetProfiles(); 321 252 } … … 365 296 } 366 297 367 namespace {368 369 class HeapSnapshotProgress: public ScriptProfiler::HeapSnapshotProgress {370 public:371 explicit HeapSnapshotProgress(InspectorProfilerFrontendDispatcher* frontend)372 : m_frontendDispatcher(frontend) { }373 void Start(int totalWork) override374 {375 m_totalWork = totalWork;376 }377 void Worked(int workDone) override378 {379 if (m_frontendDispatcher)380 m_frontendDispatcher->reportHeapSnapshotProgress(workDone, m_totalWork);381 }382 void Done() override { }383 bool isCanceled() { return false; }384 private:385 InspectorProfilerFrontendDispatcher* m_frontendDispatcher;386 int m_totalWork;387 };388 389 };390 391 void InspectorProfilerAgent::takeHeapSnapshot(ErrorString*, const bool* reportProgress)392 {393 String title = makeString(UserInitiatedProfileName, '.', String::number(m_nextUserInitiatedHeapSnapshotNumber));394 ++m_nextUserInitiatedHeapSnapshotNumber;395 396 HeapSnapshotProgress progress(reportProgress && *reportProgress ? m_frontendDispatcher.get() : nullptr);397 RefPtr<ScriptHeapSnapshot> snapshot = ScriptProfiler::takeHeapSnapshot(title, &progress);398 if (snapshot) {399 m_snapshots.add(snapshot->uid(), snapshot);400 if (m_frontendDispatcher)401 m_frontendDispatcher->addProfileHeader(createSnapshotHeader(*snapshot));402 }403 }404 405 298 void InspectorProfilerAgent::toggleRecordButton(bool isProfiling) 406 299 { … … 409 302 } 410 303 411 void InspectorProfilerAgent::getObjectByHeapObjectId(ErrorString* error, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result)412 {413 bool ok;414 unsigned id = heapSnapshotObjectId.toUInt(&ok);415 if (!ok) {416 *error = "Invalid heap snapshot object id";417 return;418 }419 Deprecated::ScriptObject heapObject = ScriptProfiler::objectByHeapObjectId(id);420 if (heapObject.hasNoValue()) {421 *error = "Object is not available";422 return;423 }424 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptFor(heapObject.scriptState());425 if (injectedScript.hasNoValue()) {426 *error = "Object is not available. Inspected context is gone";427 return;428 }429 result = injectedScript.wrapObject(heapObject, objectGroup ? *objectGroup : "");430 if (!result)431 *error = "Failed to wrap object";432 }433 434 void InspectorProfilerAgent::getHeapObjectId(ErrorString* errorString, const String& objectId, String* heapSnapshotObjectId)435 {436 InjectedScript injectedScript = m_injectedScriptManager->injectedScriptForObjectId(objectId);437 if (injectedScript.hasNoValue()) {438 *errorString = "Inspected context has gone";439 return;440 }441 Deprecated::ScriptValue value = injectedScript.findObjectById(objectId);442 if (value.hasNoValue() || value.isUndefined()) {443 *errorString = "Object with given id not found";444 return;445 }446 unsigned id = ScriptProfiler::getHeapObjectId(value);447 *heapSnapshotObjectId = String::number(id);448 }449 450 304 } // namespace WebCore 451 305 -
trunk/Source/WebCore/inspector/InspectorProfilerAgent.h
r165676 r166622 51 51 class InstrumentingAgents; 52 52 class Page; 53 class ScriptHeapSnapshot;54 53 class ScriptProfile; 55 54 class WebInjectedScriptManager; … … 69 68 void addProfileFinishedMessageToConsole(PassRefPtr<ScriptProfile>, unsigned lineNumber, unsigned columnNumber, const String& sourceURL); 70 69 void addStartProfilingMessageToConsole(const String& title, unsigned lineNumber, unsigned columnNumber, const String& sourceURL); 71 virtual void collectGarbage(ErrorString*) override;72 70 virtual void clearProfiles(ErrorString*) override { resetState(); } 73 71 void resetState(); 74 72 75 73 virtual void recompileScript() = 0; 76 virtual void isSampling(ErrorString*, bool*) override;77 virtual void hasHeapProfiler(ErrorString*, bool*) override;78 74 79 75 virtual void enable(ErrorString*) override; … … 88 84 virtual void getProfileHeaders(ErrorString*, RefPtr<Inspector::TypeBuilder::Array<Inspector::TypeBuilder::Profiler::ProfileHeader>>&) override; 89 85 virtual void getCPUProfile(ErrorString*, int uid, RefPtr<Inspector::TypeBuilder::Profiler::CPUProfile>&) override; 90 virtual void getHeapSnapshot(ErrorString*, int uid) override;91 86 virtual void removeProfile(ErrorString*, const String& type, int uid) override; 92 87 … … 94 89 virtual void willDestroyFrontendAndBackend(Inspector::InspectorDisconnectReason) override; 95 90 96 virtual void takeHeapSnapshot(ErrorString*, const bool* reportProgress) override;97 91 void toggleRecordButton(bool isProfiling); 98 99 virtual void getObjectByHeapObjectId(ErrorString*, const String& heapSnapshotObjectId, const String* objectGroup, RefPtr<Inspector::TypeBuilder::Runtime::RemoteObject>& result) override;100 virtual void getHeapObjectId(ErrorString*, const String& objectId, String* heapSnapshotObjectId) override;101 92 102 93 protected: … … 107 98 private: 108 99 typedef HashMap<unsigned int, RefPtr<ScriptProfile>> ProfilesMap; 109 typedef HashMap<unsigned int, RefPtr<ScriptHeapSnapshot>> HeapSnapshotsMap;110 100 111 101 void resetFrontendProfiles(); … … 113 103 114 104 PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> createProfileHeader(const ScriptProfile&); 115 PassRefPtr<Inspector::TypeBuilder::Profiler::ProfileHeader> createSnapshotHeader(const ScriptHeapSnapshot&);116 105 117 106 Inspector::InspectorConsoleAgent* m_consoleAgent; … … 124 113 int m_currentUserInitiatedProfileNumber; 125 114 unsigned m_nextUserInitiatedProfileNumber; 126 unsigned m_nextUserInitiatedHeapSnapshotNumber;127 115 ProfilesMap m_profiles; 128 HeapSnapshotsMap m_snapshots;129 116 130 117 typedef HashMap<String, double> ProfileNameIdleTimeMap; -
trunk/Source/WebCore/inspector/InstrumentingAgents.h
r164986 r166622 52 52 class InspectorDOMStorageAgent; 53 53 class InspectorDatabaseAgent; 54 class InspectorHeapProfilerAgent;55 54 class InspectorLayerTreeAgent; 56 55 class InspectorPageAgent; … … 135 134 void setInspectorProfilerAgent(InspectorProfilerAgent* agent) { m_inspectorProfilerAgent = agent; } 136 135 137 InspectorHeapProfilerAgent* inspectorHeapProfilerAgent() const { return m_inspectorHeapProfilerAgent; }138 void setInspectorHeapProfilerAgent(InspectorHeapProfilerAgent* agent) { m_inspectorHeapProfilerAgent = agent; }139 140 136 InspectorWorkerAgent* inspectorWorkerAgent() const { return m_inspectorWorkerAgent; } 141 137 void setInspectorWorkerAgent(InspectorWorkerAgent* agent) { m_inspectorWorkerAgent = agent; } … … 171 167 InspectorDOMDebuggerAgent* m_inspectorDOMDebuggerAgent; 172 168 InspectorProfilerAgent* m_inspectorProfilerAgent; 173 InspectorHeapProfilerAgent* m_inspectorHeapProfilerAgent;174 169 InspectorWorkerAgent* m_inspectorWorkerAgent; 175 170 }; -
trunk/Source/WebCore/inspector/WebConsoleAgent.cpp
r165199 r166622 112 112 } 113 113 114 class InspectableHeapObject final : public CommandLineAPIHost::InspectableObject {115 public:116 explicit InspectableHeapObject(int heapObjectId)117 : m_heapObjectId(heapObjectId)118 {119 }120 121 virtual Deprecated::ScriptValue get(JSC::ExecState*) override122 {123 return ScriptProfiler::objectByHeapObjectId(m_heapObjectId);124 }125 126 private:127 int m_heapObjectId;128 };129 130 void WebConsoleAgent::addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId)131 {132 if (CommandLineAPIHost* commandLineAPIHost = static_cast<WebInjectedScriptManager*>(m_injectedScriptManager)->commandLineAPIHost())133 commandLineAPIHost->addInspectedObject(std::make_unique<InspectableHeapObject>(inspectedHeapObjectId));134 }135 136 114 } // namespace WebCore 137 115 -
trunk/Source/WebCore/inspector/WebConsoleAgent.h
r163987 r166622 47 47 48 48 virtual void setMonitoringXHREnabled(ErrorString*, bool enabled) override final; 49 virtual void addInspectedHeapObject(ErrorString*, int inspectedHeapObjectId) override final;50 49 51 50 void frameWindowDiscarded(DOMWindow*); -
trunk/Source/WebCore/inspector/WorkerInspectorController.cpp
r164637 r166622 38 38 #include "InspectorClient.h" 39 39 #include "InspectorForwarding.h" 40 #include "InspectorHeapProfilerAgent.h"41 40 #include "InspectorInstrumentation.h" 42 41 #include "InspectorProfilerAgent.h" … … 98 97 99 98 m_agents.append(InspectorProfilerAgent::create(m_instrumentingAgents.get(), consoleAgent.get(), &workerGlobalScope, m_injectedScriptManager.get())); 100 m_agents.append(std::make_unique<InspectorHeapProfilerAgent>(m_instrumentingAgents.get(), m_injectedScriptManager.get()));101 99 m_agents.append(std::make_unique<InspectorTimelineAgent>(m_instrumentingAgents.get(), nullptr, InspectorTimelineAgent::WorkerInspector, nullptr)); 102 100 m_agents.append(std::move(consoleAgent)); -
trunk/Source/WebCore/inspector/protocol/Profiler.json
r163140 r166622 7 7 "description": "Profile header.", 8 8 "properties": [ 9 { "name": "typeId", "type": "string", "enum": ["CPU" , "HEAP"], "description": "Profile type name." },9 { "name": "typeId", "type": "string", "enum": ["CPU"], "description": "Profile type name." }, 10 10 { "name": "title", "type": "string", "description": "Profile title." }, 11 11 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." } … … 43 43 { "name": "idleTime", "type": "number", "optional": true } 44 44 ] 45 },46 {47 "id": "HeapSnapshotObjectId",48 "type": "string",49 "description": "Heap snashot object id."50 45 } 51 46 ], 52 47 "commands": [ 53 {54 "name": "isSampling",55 "returns": [56 { "name": "result", "type": "boolean" }57 ]58 },59 {60 "name": "hasHeapProfiler",61 "returns": [62 { "name": "result", "type": "boolean" }63 ]64 },65 48 { 66 49 "name": "enable" … … 91 74 }, 92 75 { 93 "name": "getHeapSnapshot",94 "parameters": [95 { "name": "uid", "type": "integer" }96 ]97 },98 {99 76 "name": "removeProfile", 100 77 "parameters": [ … … 105 82 { 106 83 "name": "clearProfiles" 107 },108 {109 "name": "takeHeapSnapshot",110 "parameters": [111 { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }112 ]113 },114 {115 "name": "collectGarbage"116 },117 {118 "name": "getObjectByHeapObjectId",119 "parameters": [120 { "name": "objectId", "$ref": "HeapSnapshotObjectId" },121 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }122 ],123 "returns": [124 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }125 ]126 },127 {128 "name": "getHeapObjectId",129 "parameters": [130 { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }131 ],132 "returns": [133 { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }134 ]135 84 } 136 85 ], … … 143 92 }, 144 93 { 145 "name": "addHeapSnapshotChunk",146 "parameters": [147 { "name": "uid", "type": "integer" },148 { "name": "chunk", "type": "string" }149 ]150 },151 {152 "name": "finishHeapSnapshot",153 "parameters": [154 { "name": "uid", "type": "integer" }155 ]156 },157 {158 94 "name": "setRecordingProfile", 159 95 "parameters": [ … … 163 99 { 164 100 "name": "resetProfiles" 165 },166 {167 "name": "reportHeapSnapshotProgress",168 "parameters": [169 { "name": "done", "type": "integer" },170 { "name": "total", "type": "integer" }171 ]172 101 } 173 102 ] -
trunk/Source/WebInspectorUI/ChangeLog
r166620 r166622 1 2014-04-01 Timothy Hatcher <timothy@apple.com> 2 3 Remove HeapProfiler from the Web Inspector protocol. 4 5 https://bugs.webkit.org/show_bug.cgi?id=131070 6 7 Reviewed by Joseph Pecoraro. 8 9 * UserInterface/Protocol/Legacy/6.0/InspectorWebBackendCommands.js: Updated. 10 * UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js: Ditto. 11 * Versions/Inspector-iOS-6.0.json: Removed heap related stuff. 12 * Versions/Inspector-iOS-7.0.json: Ditto. 13 1 14 2014-04-01 Joseph Pecoraro <pecoraro@apple.com> 2 15 -
trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/6.0/InspectorWebBackendCommands.js
r164541 r166622 68 68 InspectorBackend.registerCommand("Console.setMonitoringXHREnabled", [{"name": "enabled", "type": "boolean", "optional": false}], []); 69 69 InspectorBackend.registerCommand("Console.addInspectedNode", [{"name": "nodeId", "type": "number", "optional": false}], []); 70 InspectorBackend.registerCommand("Console.addInspectedHeapObject", [{"name": "heapObjectId", "type": "number", "optional": false}], []);71 70 72 71 // Network. … … 243 242 // Profiler. 244 243 InspectorBackend.registerProfilerDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Profiler"); 245 InspectorBackend.registerEnum("Profiler.ProfileHeaderTypeId", {CPU: "CPU" , CSS: "CSS", HEAP: "HEAP"});244 InspectorBackend.registerEnum("Profiler.ProfileHeaderTypeId", {CPU: "CPU"}); 246 245 InspectorBackend.registerEvent("Profiler.addProfileHeader", ["header"]); 247 InspectorBackend.registerEvent("Profiler.addHeapSnapshotChunk", ["uid", "chunk"]);248 InspectorBackend.registerEvent("Profiler.finishHeapSnapshot", ["uid"]);249 246 InspectorBackend.registerEvent("Profiler.setRecordingProfile", ["isProfiling"]); 250 247 InspectorBackend.registerEvent("Profiler.resetProfiles", []); 251 InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]);252 InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]);253 InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]);254 248 InspectorBackend.registerCommand("Profiler.enable", [], []); 255 249 InspectorBackend.registerCommand("Profiler.disable", [], []); … … 260 254 InspectorBackend.registerCommand("Profiler.removeProfile", [{"name": "type", "type": "string", "optional": false}, {"name": "uid", "type": "number", "optional": false}], []); 261 255 InspectorBackend.registerCommand("Profiler.clearProfiles", [], []); 262 InspectorBackend.registerCommand("Profiler.takeHeapSnapshot", [], []);263 InspectorBackend.registerCommand("Profiler.collectGarbage", [], []);264 InspectorBackend.registerCommand("Profiler.getObjectByHeapObjectId", [{"name": "objectId", "type": "number", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}], ["result"]);265 256 266 257 // Worker. -
trunk/Source/WebInspectorUI/UserInterface/Protocol/Legacy/7.0/InspectorWebBackendCommands.js
r166616 r166622 93 93 InspectorBackend.registerCommand("Console.setMonitoringXHREnabled", [{"name": "enabled", "type": "boolean", "optional": false}], []); 94 94 InspectorBackend.registerCommand("Console.addInspectedNode", [{"name": "nodeId", "type": "number", "optional": false}], []); 95 InspectorBackend.registerCommand("Console.addInspectedHeapObject", [{"name": "heapObjectId", "type": "number", "optional": false}], []);96 95 97 96 // Network. … … 283 282 // Profiler. 284 283 InspectorBackend.registerProfilerDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "Profiler"); 285 InspectorBackend.registerEnum("Profiler.ProfileHeaderTypeId", {CPU: "CPU", CSS: "CSS" , HEAP: "HEAP"});284 InspectorBackend.registerEnum("Profiler.ProfileHeaderTypeId", {CPU: "CPU", CSS: "CSS"}); 286 285 InspectorBackend.registerEvent("Profiler.addProfileHeader", ["header"]); 287 InspectorBackend.registerEvent("Profiler.addHeapSnapshotChunk", ["uid", "chunk"]);288 InspectorBackend.registerEvent("Profiler.finishHeapSnapshot", ["uid"]);289 286 InspectorBackend.registerEvent("Profiler.setRecordingProfile", ["isProfiling"]); 290 287 InspectorBackend.registerEvent("Profiler.resetProfiles", []); 291 InspectorBackend.registerEvent("Profiler.reportHeapSnapshotProgress", ["done", "total"]);292 InspectorBackend.registerCommand("Profiler.isSampling", [], ["result"]);293 InspectorBackend.registerCommand("Profiler.hasHeapProfiler", [], ["result"]);294 288 InspectorBackend.registerCommand("Profiler.enable", [], []); 295 289 InspectorBackend.registerCommand("Profiler.disable", [], []); … … 298 292 InspectorBackend.registerCommand("Profiler.getProfileHeaders", [], ["headers"]); 299 293 InspectorBackend.registerCommand("Profiler.getCPUProfile", [{"name": "uid", "type": "number", "optional": false}], ["profile"]); 300 InspectorBackend.registerCommand("Profiler.getHeapSnapshot", [{"name": "uid", "type": "number", "optional": false}], []);301 294 InspectorBackend.registerCommand("Profiler.removeProfile", [{"name": "type", "type": "string", "optional": false}, {"name": "uid", "type": "number", "optional": false}], []); 302 295 InspectorBackend.registerCommand("Profiler.clearProfiles", [], []); 303 InspectorBackend.registerCommand("Profiler.takeHeapSnapshot", [{"name": "reportProgress", "type": "boolean", "optional": true}], []);304 InspectorBackend.registerCommand("Profiler.collectGarbage", [], []);305 InspectorBackend.registerCommand("Profiler.getObjectByHeapObjectId", [{"name": "objectId", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}], ["result"]);306 InspectorBackend.registerCommand("Profiler.getHeapObjectId", [{"name": "objectId", "type": "string", "optional": false}], ["heapSnapshotObjectId"]);307 308 // HeapProfiler.309 InspectorBackend.registerHeapProfilerDispatcher = InspectorBackend.registerDomainDispatcher.bind(InspectorBackend, "HeapProfiler");310 InspectorBackend.registerEvent("HeapProfiler.addProfileHeader", ["header"]);311 InspectorBackend.registerEvent("HeapProfiler.addHeapSnapshotChunk", ["uid", "chunk"]);312 InspectorBackend.registerEvent("HeapProfiler.finishHeapSnapshot", ["uid"]);313 InspectorBackend.registerEvent("HeapProfiler.resetProfiles", []);314 InspectorBackend.registerEvent("HeapProfiler.reportHeapSnapshotProgress", ["done", "total"]);315 InspectorBackend.registerCommand("HeapProfiler.hasHeapProfiler", [], ["result"]);316 InspectorBackend.registerCommand("HeapProfiler.getProfileHeaders", [], ["headers"]);317 InspectorBackend.registerCommand("HeapProfiler.getHeapSnapshot", [{"name": "uid", "type": "number", "optional": false}], []);318 InspectorBackend.registerCommand("HeapProfiler.removeProfile", [{"name": "uid", "type": "number", "optional": false}], []);319 InspectorBackend.registerCommand("HeapProfiler.clearProfiles", [], []);320 InspectorBackend.registerCommand("HeapProfiler.takeHeapSnapshot", [{"name": "reportProgress", "type": "boolean", "optional": true}], []);321 InspectorBackend.registerCommand("HeapProfiler.collectGarbage", [], []);322 InspectorBackend.registerCommand("HeapProfiler.getObjectByHeapObjectId", [{"name": "objectId", "type": "string", "optional": false}, {"name": "objectGroup", "type": "string", "optional": true}], ["result"]);323 InspectorBackend.registerCommand("HeapProfiler.getHeapObjectId", [{"name": "objectId", "type": "string", "optional": false}], ["heapSnapshotObjectId"]);324 296 325 297 // Worker. -
trunk/Source/WebInspectorUI/Versions/Inspector-iOS-6.0.json
r164541 r166622 542 542 "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions).", 543 543 "hidden": true 544 },545 {546 "name": "addInspectedHeapObject",547 "parameters": [548 { "name": "heapObjectId", "type": "integer" }549 ]550 544 } 551 545 ], … … 2322 2316 "description": "Profile header.", 2323 2317 "properties": [ 2324 { "name": "typeId", "type": "string", "enum": ["CPU" , "CSS", "HEAP"], "description": "Profile type name." },2318 { "name": "typeId", "type": "string", "enum": ["CPU"], "description": "Profile type name." }, 2325 2319 { "name": "title", "type": "string", "description": "Profile title." }, 2326 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." }, 2327 { "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." } 2320 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." } 2328 2321 ] 2329 2322 }, … … 2340 2333 "commands": [ 2341 2334 { 2342 "name": "isSampling",2343 "returns": [2344 { "name": "result", "type": "boolean" }2345 ]2346 },2347 {2348 "name": "hasHeapProfiler",2349 "returns": [2350 { "name": "result", "type": "boolean" }2351 ]2352 },2353 {2354 2335 "name": "enable" 2355 2336 }, … … 2388 2369 { 2389 2370 "name": "clearProfiles" 2390 },2391 {2392 "name": "takeHeapSnapshot"2393 },2394 {2395 "name": "collectGarbage"2396 },2397 {2398 "name": "getObjectByHeapObjectId",2399 "parameters": [2400 { "name": "objectId", "type": "integer" },2401 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }2402 ],2403 "returns": [2404 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }2405 ]2406 2371 } 2407 2372 ], … … 2414 2379 }, 2415 2380 { 2416 "name": "addHeapSnapshotChunk",2417 "parameters": [2418 { "name": "uid", "type": "integer" },2419 { "name": "chunk", "type": "string" }2420 ]2421 },2422 {2423 "name": "finishHeapSnapshot",2424 "parameters": [2425 { "name": "uid", "type": "integer" }2426 ]2427 },2428 {2429 2381 "name": "setRecordingProfile", 2430 2382 "parameters": [ … … 2434 2386 { 2435 2387 "name": "resetProfiles" 2436 },2437 {2438 "name": "reportHeapSnapshotProgress",2439 "parameters": [2440 { "name": "done", "type": "integer" },2441 { "name": "total", "type": "integer" }2442 ]2443 2388 } 2444 2389 ] -
trunk/Source/WebInspectorUI/Versions/Inspector-iOS-7.0.json
r166616 r166622 710 710 ], 711 711 "description": "Enables console to refer to the node with given id via $x (see Command Line API for more details $x functions)." 712 },713 {714 "name": "addInspectedHeapObject",715 "parameters": [716 { "name": "heapObjectId", "type": "integer" }717 ]718 712 } 719 713 ], … … 2668 2662 "description": "Profile header.", 2669 2663 "properties": [ 2670 { "name": "typeId", "type": "string", "enum": ["CPU", "CSS" , "HEAP"], "description": "Profile type name." },2664 { "name": "typeId", "type": "string", "enum": ["CPU", "CSS"], "description": "Profile type name." }, 2671 2665 { "name": "title", "type": "string", "description": "Profile title." }, 2672 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." }, 2673 { "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." } 2666 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." } 2674 2667 ] 2675 2668 }, … … 2696 2689 "properties": [ 2697 2690 { "name": "head", "$ref": "CPUProfileNode", "optional": true }, 2698 { "name": "idleTime", "type": "number", "optional": true }, 2699 { "name": "samples", "optional": true, "type": "array", "items": { "type": "integer" }, "description": "Ids of samples top nodes." } 2700 ] 2701 }, 2702 { 2703 "id": "HeapSnapshotObjectId", 2704 "type": "string", 2705 "description": "Heap snashot object id." 2691 { "name": "idleTime", "type": "number", "optional": true } 2692 ] 2706 2693 } 2707 2694 ], 2708 2695 "commands": [ 2709 2696 { 2710 "name": "isSampling",2711 "returns": [2712 { "name": "result", "type": "boolean" }2713 ]2714 },2715 {2716 "name": "hasHeapProfiler",2717 "returns": [2718 { "name": "result", "type": "boolean" }2719 ]2720 },2721 {2722 2697 "name": "enable" 2723 2698 }, … … 2744 2719 "returns": [ 2745 2720 { "name": "profile", "$ref": "CPUProfile" } 2746 ]2747 },2748 {2749 "name": "getHeapSnapshot",2750 "parameters": [2751 { "name": "uid", "type": "integer" }2752 2721 ] 2753 2722 }, … … 2761 2730 { 2762 2731 "name": "clearProfiles" 2763 },2764 {2765 "name": "takeHeapSnapshot",2766 "parameters": [2767 { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }2768 ]2769 },2770 {2771 "name": "collectGarbage"2772 },2773 {2774 "name": "getObjectByHeapObjectId",2775 "parameters": [2776 { "name": "objectId", "$ref": "HeapSnapshotObjectId" },2777 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }2778 ],2779 "returns": [2780 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }2781 ]2782 },2783 {2784 "name": "getHeapObjectId",2785 "parameters": [2786 { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }2787 ],2788 "returns": [2789 { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }2790 ]2791 2732 } 2792 2733 ], … … 2799 2740 }, 2800 2741 { 2801 "name": "addHeapSnapshotChunk",2802 "parameters": [2803 { "name": "uid", "type": "integer" },2804 { "name": "chunk", "type": "string" }2805 ]2806 },2807 {2808 "name": "finishHeapSnapshot",2809 "parameters": [2810 { "name": "uid", "type": "integer" }2811 ]2812 },2813 {2814 2742 "name": "setRecordingProfile", 2815 2743 "parameters": [ … … 2819 2747 { 2820 2748 "name": "resetProfiles" 2821 },2822 {2823 "name": "reportHeapSnapshotProgress",2824 "parameters": [2825 { "name": "done", "type": "integer" },2826 { "name": "total", "type": "integer" }2827 ]2828 }2829 ]2830 },2831 {2832 "domain": "HeapProfiler",2833 "types": [2834 {2835 "id": "ProfileHeader",2836 "type": "object",2837 "description": "Profile header.",2838 "properties": [2839 { "name": "title", "type": "string", "description": "Profile title." },2840 { "name": "uid", "type": "integer", "description": "Unique identifier of the profile." },2841 { "name": "maxJSObjectId", "type": "integer", "optional": true, "description": "Last seen JS object Id." }2842 ]2843 },2844 {2845 "id": "HeapSnapshotObjectId",2846 "type": "string",2847 "description": "Heap snashot object id."2848 }2849 ],2850 "commands": [2851 {2852 "name": "hasHeapProfiler",2853 "returns": [2854 { "name": "result", "type": "boolean" }2855 ]2856 },2857 {2858 "name": "getProfileHeaders",2859 "returns": [2860 { "name": "headers", "type": "array", "items": { "$ref": "ProfileHeader"} }2861 ]2862 },2863 {2864 "name": "getHeapSnapshot",2865 "parameters": [2866 { "name": "uid", "type": "integer" }2867 ]2868 },2869 {2870 "name": "removeProfile",2871 "parameters": [2872 { "name": "uid", "type": "integer" }2873 ]2874 },2875 {2876 "name": "clearProfiles"2877 },2878 {2879 "name": "takeHeapSnapshot",2880 "parameters": [2881 { "name": "reportProgress", "type": "boolean", "optional": true, "description": "If true 'reportHeapSnapshotProgress' events will be generated while snapshot is being taken." }2882 ]2883 },2884 {2885 "name": "collectGarbage"2886 },2887 {2888 "name": "getObjectByHeapObjectId",2889 "parameters": [2890 { "name": "objectId", "$ref": "HeapSnapshotObjectId" },2891 { "name": "objectGroup", "type": "string", "optional": true, "description": "Symbolic group name that can be used to release multiple objects." }2892 ],2893 "returns": [2894 { "name": "result", "$ref": "Runtime.RemoteObject", "description": "Evaluation result." }2895 ]2896 },2897 {2898 "name": "getHeapObjectId",2899 "parameters": [2900 { "name": "objectId", "$ref": "Runtime.RemoteObjectId", "description": "Identifier of the object to get heap object id for." }2901 ],2902 "returns": [2903 { "name": "heapSnapshotObjectId", "$ref": "HeapSnapshotObjectId", "description": "Id of the heap snapshot object corresponding to the passed remote object id." }2904 ]2905 }2906 ],2907 "events": [2908 {2909 "name": "addProfileHeader",2910 "parameters": [2911 { "name": "header", "$ref": "ProfileHeader" }2912 ]2913 },2914 {2915 "name": "addHeapSnapshotChunk",2916 "parameters": [2917 { "name": "uid", "type": "integer" },2918 { "name": "chunk", "type": "string" }2919 ]2920 },2921 {2922 "name": "finishHeapSnapshot",2923 "parameters": [2924 { "name": "uid", "type": "integer" }2925 ]2926 },2927 {2928 "name": "resetProfiles"2929 },2930 {2931 "name": "reportHeapSnapshotProgress",2932 "parameters": [2933 { "name": "done", "type": "integer" },2934 { "name": "total", "type": "integer" }2935 ]2936 2749 } 2937 2750 ]
Note: See TracChangeset
for help on using the changeset viewer.