Title: [131423] trunk/Source/WebCore
- Revision
- 131423
- Author
- loi...@chromium.org
- Date
- 2012-10-16 00:57:43 -0700 (Tue, 16 Oct 2012)
Log Message
Web Inspector: NMI Instrument InspectorOverlay. It costs us ~9Mb because it creates page size canvas.
https://bugs.webkit.org/show_bug.cgi?id=99426
Reviewed by Yury Semikhatsky.
New object type InspectorOverlay was added. InspectorOverlay was instrumented.
The instrumentation code automatically visits all the objects that can be reached via m_overlayPage.
* dom/WebCoreMemoryInstrumentation.cpp:
(WebCore):
* dom/WebCoreMemoryInstrumentation.h:
(WebCoreMemoryTypes):
* inspector/InspectorOverlay.cpp:
(WebCore::InspectorOverlay::reportMemoryUsage):
(WebCore):
* inspector/InspectorOverlay.h:
(InspectorOverlay):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (131422 => 131423)
--- trunk/Source/WebCore/ChangeLog 2012-10-16 07:29:57 UTC (rev 131422)
+++ trunk/Source/WebCore/ChangeLog 2012-10-16 07:57:43 UTC (rev 131423)
@@ -1,3 +1,23 @@
+2012-10-16 Ilya Tikhonovsky <loi...@chromium.org>
+
+ Web Inspector: NMI Instrument InspectorOverlay. It costs us ~9Mb because it creates page size canvas.
+ https://bugs.webkit.org/show_bug.cgi?id=99426
+
+ Reviewed by Yury Semikhatsky.
+
+ New object type InspectorOverlay was added. InspectorOverlay was instrumented.
+ The instrumentation code automatically visits all the objects that can be reached via m_overlayPage.
+
+ * dom/WebCoreMemoryInstrumentation.cpp:
+ (WebCore):
+ * dom/WebCoreMemoryInstrumentation.h:
+ (WebCoreMemoryTypes):
+ * inspector/InspectorOverlay.cpp:
+ (WebCore::InspectorOverlay::reportMemoryUsage):
+ (WebCore):
+ * inspector/InspectorOverlay.h:
+ (InspectorOverlay):
+
2012-10-16 Kent Tamura <tk...@chromium.org>
Remove unused functions in Locale* classes
Modified: trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp (131422 => 131423)
--- trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp 2012-10-16 07:29:57 UTC (rev 131422)
+++ trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.cpp 2012-10-16 07:57:43 UTC (rev 131423)
@@ -57,6 +57,7 @@
MemoryObjectType WebCoreMemoryTypes::InspectorMemoryAgent = "WebInspector.MemoryAgent";
MemoryObjectType WebCoreMemoryTypes::InspectorDOMStorageAgent = "WebInspector.DOMStorageAgent";
MemoryObjectType WebCoreMemoryTypes::InspectorDOMStorageResources = "WebInspector.DOMStorageAgent.Resources";
+MemoryObjectType WebCoreMemoryTypes::InspectorOverlay = "WebInspector.Overlay";
MemoryObjectType WebCoreMemoryTypes::InspectorProfilerAgent = "WebInspector.ProfilerAgent";
MemoryObjectType WebCoreMemoryTypes::JSHeapUsed = "JSHeap.Used";
Modified: trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.h (131422 => 131423)
--- trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.h 2012-10-16 07:29:57 UTC (rev 131422)
+++ trunk/Source/WebCore/dom/WebCoreMemoryInstrumentation.h 2012-10-16 07:57:43 UTC (rev 131423)
@@ -65,6 +65,7 @@
static MemoryObjectType InspectorMemoryAgent;
static MemoryObjectType InspectorDOMStorageAgent;
static MemoryObjectType InspectorDOMStorageResources;
+ static MemoryObjectType InspectorOverlay;
static MemoryObjectType InspectorProfilerAgent;
static MemoryObjectType JSHeapUsed;
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.cpp (131422 => 131423)
--- trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2012-10-16 07:29:57 UTC (rev 131422)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.cpp 2012-10-16 07:57:43 UTC (rev 131423)
@@ -50,6 +50,7 @@
#include "ScriptValue.h"
#include "Settings.h"
#include "StyledElement.h"
+#include "WebCoreMemoryInstrumentation.h"
#include <wtf/text/StringBuilder.h>
namespace WebCore {
@@ -499,6 +500,20 @@
overlayPage()->mainFrame()->script()->evaluate(ScriptSourceCode(makeString("dispatch(", command->toJSONString(), ")")));
}
+void InspectorOverlay::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
+{
+ MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::InspectorOverlay);
+ info.addMember(m_page);
+ info.addMember(m_client);
+ info.addMember(m_pausedInDebuggerMessage);
+ info.addMember(m_highlightNode);
+ info.addMember(m_nodeHighlightConfig);
+ info.addMember(m_highlightRect);
+ info.addMember(m_overlayPage);
+ info.addMember(m_rectHighlightConfig);
+ info.addMember(m_size);
+}
+
} // namespace WebCore
#endif // ENABLE(INSPECTOR)
Modified: trunk/Source/WebCore/inspector/InspectorOverlay.h (131422 => 131423)
--- trunk/Source/WebCore/inspector/InspectorOverlay.h 2012-10-16 07:29:57 UTC (rev 131422)
+++ trunk/Source/WebCore/inspector/InspectorOverlay.h 2012-10-16 07:57:43 UTC (rev 131423)
@@ -110,6 +110,8 @@
Node* highlightedNode() const;
+ void reportMemoryUsage(MemoryObjectInfo*) const;
+
private:
InspectorOverlay(Page*, InspectorClient*);
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes