Web Inspector: partially instrument DOM Tree native memory.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 14:08:05 +0000 (14:08 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 14:08:05 +0000 (14:08 +0000)
commita97b1f1057d80b8d601823ccba6dfb1d5d01cb37
treead124721d34dd7a65c8d6c2a2b4dbb8d16b23307
parentd7d3ad49696b52a7a3d3435a5de472c8a994fde1
Web Inspector: partially instrument DOM Tree native memory.
https://bugs.webkit.org/show_bug.cgi?id=89568

PerformanceTests:

This patch adds MemoryInstrumentation class that counts all visited
objects and calls reportMemoryUsage.

Reviewed by Yury Semikhatsky.

* inspector/native-memory-snapshot.html:

Source/WebCore:

This patch adds MemoryInstrumentation class that counts all visited
objects and calls reportMemoryUsage for the instrumented classes.

Reviewed by Yury Semikhatsky.

* GNUmakefile.list.am:
* Target.pri:
* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
(ScriptWrappable):
* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
(ScriptWrappable):
* css/StylePropertySet.h:
(WebCore::StylePropertySet::reportMemoryUsage):
(StylePropertySet):
* dom/ContainerNode.h:
(WebCore::ContainerNode::reportMemoryUsage):
(ContainerNode):
* dom/Element.h:
(WebCore::Element::reportMemoryUsage):
(Element):
* dom/ElementAttributeData.h:
(WebCore::ElementAttributeData::reportMemoryUsage):
(ElementAttributeData):
* dom/MemoryInstrumentation.h: Added.
(WebCore):
(MemoryInstrumentation):
(WebCore::MemoryInstrumentation::~MemoryInstrumentation):
(WebCore::MemoryInstrumentation::reportObject):
(WebCore::MemoryInstrumentation::reportPointer):
(MemoryObjectInfo):
(WebCore::MemoryObjectInfo::MemoryObjectInfo):
(WebCore::MemoryObjectInfo::reportInstrumentedPointer):
(WebCore::MemoryObjectInfo::reportPointer):
(WebCore::MemoryObjectInfo::reportInstrumentedObject):
(WebCore::MemoryObjectInfo::reportObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCore::MemoryObjectInfo::objectType):
(WebCore::MemoryObjectInfo::objectSize):
(WebCore::MemoryInstrumentation::reportInstrumentedPointer):
(WebCore::MemoryInstrumentation::reportInstrumentedObject):
* dom/Node.cpp:
(WebCore::Node::reportMemoryUsage):
(WebCore):
* dom/Node.h:
(Node):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
(WebCore::QualifiedName::reportMemoryUsage):
* inspector/InspectorMemoryAgent.cpp:
(MemoryBlockName):
(WebCore):
(WebCore::addMemoryBlockFor):
(WebCore::domTreeInfo):
(WebCore::memoryCacheInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
* platform/TreeShared.h:
(WebCore::TreeShared::reportMemoryUsage):
(TreeShared):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121022 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
PerformanceTests/ChangeLog
PerformanceTests/inspector/native-memory-snapshot.html
Source/WebCore/ChangeLog
Source/WebCore/GNUmakefile.list.am
Source/WebCore/Target.pri
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/ScriptWrappable.h
Source/WebCore/bindings/v8/ScriptWrappable.h
Source/WebCore/css/StylePropertySet.h
Source/WebCore/dom/ContainerNode.h
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementAttributeData.h
Source/WebCore/dom/MemoryInstrumentation.h [new file with mode: 0644]
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/Node.h
Source/WebCore/dom/QualifiedName.h
Source/WebCore/inspector/InspectorMemoryAgent.cpp
Source/WebCore/platform/TreeShared.h