Web Inspector: extract Vector instrumentation from core NMI code into MemoryInstrumen...
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 07:54:44 +0000 (07:54 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 25 Sep 2012 07:54:44 +0000 (07:54 +0000)
commitd2581162c17f46c6ebc4b879664a194dfe81e7c4
treeee8813fbfd91fc2a014439e83d003368868733db
parentfb71b8d37ddc26f28dccf3d34605b0f56922fdc4
Web Inspector: extract Vector instrumentation from core NMI code into MemoryInstrumentationVector.h header.
https://bugs.webkit.org/show_bug.cgi?id=96650

Reviewed by Vsevolod Vlasov.

Source/WebCore:

addInstrumentedVector and addInstrumentedVectorPtr were replaced with addMember.
The same thing happens with addVector and addVectorPtr.

* css/CSSGradientValue.cpp:
(WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::reportDescendantMemoryUsage):
* css/CSSRuleList.cpp:
(WebCore::StaticCSSRuleList::reportMemoryUsage):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::reportMemoryUsage):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::reportDescendantMemoryUsage):
* css/MediaList.cpp:
(WebCore::MediaQuerySet::reportMemoryUsage):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::reportMemoryUsage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleRule.cpp:
(WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::reportMemoryUsage):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
(WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
* dom/Document.cpp:
(WebCore::Document::reportMemoryUsage):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::reportMemoryUsage):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::reportMemoryUsage):

Source/WebKit/chromium:

Test for instrumented vector.

* tests/MemoryInstrumentationTest.cpp:
(WebCore::InstrumentedOwner::InstrumentedOwner):
(WebCore::TEST):
(WebCore):

Source/WTF:

Added reportMemoryUsage free template function with default body to core NMI code
and add custom version of reportMemoryUsage function for Vectors.

* GNUmakefile.list.am:
* WTF.gypi:
* WTF.pro:
* WTF.vcproj/WTF.vcproj:
* WTF.xcodeproj/project.pbxproj:
* wtf/MemoryInstrumentation.h:
(WTF):
(MemoryInstrumentation):
(WTF::MemoryInstrumentation::addObjectImpl):
* wtf/MemoryInstrumentationVector.h: Added.
(WTF):
(WTF::instrumentVectorValues):
(WTF::reportMemoryUsage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129466 268f45cc-cd09-0410-ab3c-d52691b4dbfc
38 files changed:
Source/WTF/ChangeLog
Source/WTF/GNUmakefile.list.am
Source/WTF/WTF.gypi
Source/WTF/WTF.pro
Source/WTF/WTF.vcproj/WTF.vcproj
Source/WTF/WTF.xcodeproj/project.pbxproj
Source/WTF/wtf/MemoryInstrumentation.h
Source/WTF/wtf/MemoryInstrumentationVector.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/bindings/v8/V8PerIsolateData.cpp
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSImageSetValue.cpp
Source/WebCore/css/CSSMediaRule.cpp
Source/WebCore/css/CSSRuleList.cpp
Source/WebCore/css/CSSStyleSheet.cpp
Source/WebCore/css/CSSValueList.cpp
Source/WebCore/css/MediaList.cpp
Source/WebCore/css/MediaQuery.cpp
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleRule.cpp
Source/WebCore/css/StyleSheetContents.cpp
Source/WebCore/css/WebKitCSSKeyframesRule.cpp
Source/WebCore/css/WebKitCSSRegionRule.cpp
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/DocumentStyleSheetCollection.cpp
Source/WebCore/dom/ElementAttributeData.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/platform/SharedBuffer.cpp
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/BitmapImage.h
Source/WebCore/platform/network/FormData.cpp
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/MemoryInstrumentationTest.cpp