Title: [132466] trunk/Source/WebCore
- Revision
- 132466
- Author
- [email protected]
- Date
- 2012-10-25 03:53:54 -0700 (Thu, 25 Oct 2012)
Log Message
Web Inspector: NMI instrument InspectorDebuggerAgent. It uses a lot of memory on heavy js sites because it keeps all the scripts in a map.
https://bugs.webkit.org/show_bug.cgi?id=100340
Reviewed by Yury Semikhatsky.
* dom/WebCoreMemoryInstrumentation.cpp:
(WebCore):
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes):
* inspector/InspectorDebuggerAgent.cpp:
(WebCore::InspectorDebuggerAgent::reportMemoryUsage):
(WebCore):
(WebCore::ScriptDebugListener::Script::reportMemoryUsage):
* inspector/InspectorDebuggerAgent.h:
(InspectorDebuggerAgent):
* inspector/ScriptDebugListener.h:
(Script):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (132465 => 132466)
--- trunk/Source/WebCore/ChangeLog 2012-10-25 10:43:33 UTC (rev 132465)
+++ trunk/Source/WebCore/ChangeLog 2012-10-25 10:53:54 UTC (rev 132466)
@@ -1,3 +1,23 @@
+2012-10-25 Ilya Tikhonovsky <[email protected]>
+
+ Web Inspector: NMI instrument InspectorDebuggerAgent. It uses a lot of memory on heavy js sites because it keeps all the scripts in a map.
+ https://bugs.webkit.org/show_bug.cgi?id=100340
+
+ Reviewed by Yury Semikhatsky.
+
+ * dom/WebCoreMemoryInstrumentation.cpp:
+ (WebCore):
+ * dom/WebCoreMemoryInstrumentation.h:
+ (WebCoreMemoryTypes):
+ * inspector/InspectorDebuggerAgent.cpp:
+ (WebCore::InspectorDebuggerAgent::reportMemoryUsage):
+ (WebCore):
+ (WebCore::ScriptDebugListener::Script::reportMemoryUsage):
+ * inspector/InspectorDebuggerAgent.h:
+ (InspectorDebuggerAgent):
+ * inspector/ScriptDebugListener.h:
+ (Script):
+
2012-10-25 Adam Barth <[email protected]>
[V8] We can handle ActiveDOMNodes and DOMNodes in the same GC visitor
Modified: trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp (132465 => 132466)
--- trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp 2012-10-25 10:43:33 UTC (rev 132465)
+++ trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp 2012-10-25 10:53:54 UTC (rev 132466)
@@ -59,6 +59,7 @@
MemoryObjectType WebCoreMemoryTypes::InspectorDOMStorageResources = "WebInspector.DOMStorageAgent.Resources";
MemoryObjectType WebCoreMemoryTypes::InspectorOverlay = "WebInspector.Overlay";
MemoryObjectType WebCoreMemoryTypes::InspectorProfilerAgent = "WebInspector.ProfilerAgent";
+MemoryObjectType WebCoreMemoryTypes::InspectorDebuggerAgent = "WebInspector.DebuggerAgent";
MemoryObjectType WebCoreMemoryTypes::JSHeapUsed = "JSHeap.Used";
MemoryObjectType WebCoreMemoryTypes::JSHeapUnused = "JSHeap.Unused";
Modified: trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.h (132465 => 132466)
--- trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.h 2012-10-25 10:43:33 UTC (rev 132465)
+++ trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.h 2012-10-25 10:53:54 UTC (rev 132466)
@@ -67,6 +67,7 @@
static MemoryObjectType InspectorDOMStorageResources;
static MemoryObjectType InspectorOverlay;
static MemoryObjectType InspectorProfilerAgent;
+ static MemoryObjectType InspectorDebuggerAgent;
static MemoryObjectType JSHeapUsed;
static MemoryObjectType JSHeapUnused;
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp (132465 => 132466)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2012-10-25 10:43:33 UTC (rev 132465)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.cpp 2012-10-25 10:53:54 UTC (rev 132466)
@@ -43,6 +43,8 @@
#include "RegularExpression.h"
#include "ScriptDebugServer.h"
#include "ScriptObject.h"
+#include <wtf/MemoryInstrumentationHashMap.h>
+#include <wtf/MemoryInstrumentationVector.h>
#include <wtf/text/WTFString.h>
using WebCore::TypeBuilder::Array;
@@ -734,6 +736,29 @@
m_breakAuxData = 0;
}
+void InspectorDebuggerAgent::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+ MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorDebuggerAgent);
+ InspectorBaseAgent<InspectorDebuggerAgent>::reportMemoryUsage(memoryObjectInfo);
+ info.addMember(m_injectedScriptManager);
+ info.addWeakPointer(m_frontend);
+ info.addMember(m_pausedScriptState);
+ info.addMember(m_currentCallStack);
+ info.addMember(m_scripts);
+ info.addMember(m_breakpointIdToDebugServerBreakpointIds);
+ info.addMember(m_continueToLocationBreakpointId);
+ info.addMember(m_breakAuxData);
+ info.addMember(m_listener);
+}
+
+void ScriptDebugListener::Script::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+ MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorDebuggerAgent);
+ info.addMember(url);
+ info.addMember(source);
+ info.addMember(sourceMappingURL);
+}
+
} // namespace WebCore
#endif // ENABLE(_javascript__DEBUGGER) && ENABLE(INSPECTOR)
Modified: trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h (132465 => 132466)
--- trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2012-10-25 10:43:33 UTC (rev 132465)
+++ trunk/Source/WebCore/inspector/InspectorDebuggerAgent.h 2012-10-25 10:53:54 UTC (rev 132466)
@@ -128,6 +128,8 @@
virtual ScriptDebugServer& scriptDebugServer() = 0;
+ virtual void reportMemoryUsage(MemoryObjectInfo*) const;
+
protected:
InspectorDebuggerAgent(InstrumentingAgents*, InspectorState*, InjectedScriptManager*);
Modified: trunk/Source/WebCore/inspector/ScriptDebugListener.h (132465 => 132466)
--- trunk/Source/WebCore/inspector/ScriptDebugListener.h 2012-10-25 10:43:33 UTC (rev 132465)
+++ trunk/Source/WebCore/inspector/ScriptDebugListener.h 2012-10-25 10:53:54 UTC (rev 132466)
@@ -60,6 +60,8 @@
int endLine;
int endColumn;
bool isContentScript;
+
+ void reportMemoryUsage(MemoryObjectInfo*) const;
};
virtual ~ScriptDebugListener() { }
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes