Web Inspector: NMI: extract MemoryObjectType constants from MemoryInstrumentation.
authorloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2012 15:11:06 +0000 (15:11 +0000)
committerloislo@chromium.org <loislo@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2012 15:11:06 +0000 (15:11 +0000)
commit0dd3777048827f6887d184c00fd0079bf8f7eff3
tree3d47c13a3f5841f1fdff42638e92f79c886b2501
parentb1388487967c803b1fbf7dcaacb781171e0ed22d
Web Inspector: NMI: extract MemoryObjectType constants from MemoryInstrumentation.
https://bugs.webkit.org/show_bug.cgi?id=95850

Reviewed by Yury Semikhatsky.

I'd like to extract MemoryObjectTypes into separate classes.
After that we will be able to move core NMI instrumentation code to WTF.

Source/WebCore:

* bindings/js/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
* bindings/v8/DOMDataStore.cpp:
(WebCore::DOMDataStore::reportMemoryUsage):
* bindings/v8/IntrusiveDOMWrapperMap.h:
(WebCore::ChunkedTable::reportMemoryUsage):
* bindings/v8/ScriptWrappable.h:
(WebCore::ScriptWrappable::reportMemoryUsage):
* bindings/v8/V8Binding.cpp:
(WebCore::StringCache::reportMemoryUsage):
* bindings/v8/V8DOMMap.h:
* bindings/v8/V8PerIsolateData.cpp:
(WebCore::V8PerIsolateData::reportMemoryUsage):
* css/CSSAspectRatioValue.cpp:
(WebCore::CSSAspectRatioValue::reportDescendantMemoryUsage):
* css/CSSBorderImageSliceValue.cpp:
(WebCore::CSSBorderImageSliceValue::reportDescendantMemoryUsage):
* css/CSSCalculationValue.cpp:
(WebCore::CSSCalcValue::reportDescendantMemoryUsage):
* css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::reportDescendantMemoryUsage):
* css/CSSCharsetRule.cpp:
(WebCore::CSSCharsetRule::reportDescendantMemoryUsage):
* css/CSSComputedStyleDeclaration.cpp:
(WebCore::CSSComputedStyleDeclaration::reportMemoryUsage):
* css/CSSCrossfadeValue.cpp:
(WebCore::CSSCrossfadeValue::reportDescendantMemoryUsage):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
* css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::reportDescendantMemoryUsage):
* css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcValue::reportDescendantMemoryUsage):
* css/CSSFunctionValue.cpp:
(WebCore::CSSFunctionValue::reportDescendantMemoryUsage):
* css/CSSGradientValue.cpp:
(WebCore::CSSGradientColorStop::reportMemoryUsage):
(WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
(WebCore::CSSLinearGradientValue::reportDescendantMemoryUsage):
(WebCore::CSSRadialGradientValue::reportDescendantMemoryUsage):
* css/CSSImageGeneratorValue.cpp:
(WebCore::CSSImageGeneratorValue::reportBaseClassMemoryUsage):
* css/CSSImageSetValue.cpp:
(WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
(WebCore::CSSImageSetValue::ImageWithScale::reportMemoryUsage):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::reportDescendantMemoryUsage):
* css/CSSImportRule.cpp:
(WebCore::CSSImportRule::reportDescendantMemoryUsage):
* css/CSSInheritedValue.cpp:
(WebCore::CSSInheritedValue::reportDescendantMemoryUsage):
* css/CSSInitialValue.cpp:
(WebCore::CSSInitialValue::reportDescendantMemoryUsage):
* css/CSSLineBoxContainValue.cpp:
(WebCore::CSSLineBoxContainValue::reportDescendantMemoryUsage):
* css/CSSMediaRule.cpp:
(WebCore::CSSMediaRule::reportDescendantMemoryUsage):
* css/CSSPageRule.cpp:
(WebCore::CSSPageRule::reportDescendantMemoryUsage):
* css/CSSPrimitiveValue.cpp:
(WebCore::CSSPrimitiveValue::reportDescendantMemoryUsage):
* css/CSSProperty.cpp:
(WebCore::CSSProperty::reportMemoryUsage):
* css/CSSReflectValue.cpp:
(WebCore::CSSReflectValue::reportDescendantMemoryUsage):
* css/CSSRule.cpp:
(WebCore::CSSRule::reportBaseClassMemoryUsage):
* css/CSSRuleList.cpp:
(WebCore::StaticCSSRuleList::reportMemoryUsage):
* css/CSSRuleList.h:
* css/CSSSelectorList.cpp:
(WebCore::CSSSelectorList::reportMemoryUsage):
* css/CSSStyleRule.cpp:
(WebCore::CSSStyleRule::reportDescendantMemoryUsage):
* css/CSSStyleSheet.cpp:
(WebCore::CSSStyleSheet::reportMemoryUsage):
* css/CSSTimingFunctionValue.cpp:
(WebCore::CSSLinearTimingFunctionValue::reportDescendantMemoryUsage):
(WebCore::CSSCubicBezierTimingFunctionValue::reportDescendantMemoryUsage):
(WebCore::CSSStepsTimingFunctionValue::reportDescendantMemoryUsage):
* css/CSSUnicodeRangeValue.cpp:
(WebCore::CSSUnicodeRangeValue::reportDescendantMemoryUsage):
* css/CSSUnknownRule.h:
(WebCore::CSSUnknownRule::reportDescendantMemoryUsage):
* css/CSSValue.cpp:
(WebCore::TextCloneCSSValue::reportDescendantMemoryUsage):
* css/CSSValueList.cpp:
(WebCore::CSSValueList::reportDescendantMemoryUsage):
* css/CSSVariableValue.h:
(WebCore::CSSVariableValue::reportDescendantMemoryUsage):
* css/FontFeatureValue.cpp:
(WebCore::FontFeatureValue::reportDescendantMemoryUsage):
* css/FontValue.cpp:
(WebCore::FontValue::reportDescendantMemoryUsage):
* css/MediaList.cpp:
(WebCore::MediaQuerySet::reportMemoryUsage):
(WebCore::MediaList::reportMemoryUsage):
* css/MediaQuery.cpp:
(WebCore::MediaQuery::reportMemoryUsage):
* css/MediaQueryExp.cpp:
(WebCore::MediaQueryExp::reportMemoryUsage):
* css/PropertySetCSSStyleDeclaration.cpp:
(WebCore::PropertySetCSSStyleDeclaration::reportMemoryUsage):
(WebCore::StyleRuleCSSStyleDeclaration::reportMemoryUsage):
(WebCore::InlineCSSStyleDeclaration::reportMemoryUsage):
* css/ShadowValue.cpp:
(WebCore::ShadowValue::reportDescendantMemoryUsage):
* css/StylePropertySet.cpp:
(WebCore::StylePropertySet::reportMemoryUsage):
* css/StyleResolver.cpp:
(WebCore::StyleResolver::Features::reportMemoryUsage):
(WebCore::StyleResolver::collectMatchingRulesForList):
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::reportMemoryUsage):
(WebCore::StyleRule::reportDescendantMemoryUsage):
(WebCore::StyleRulePage::reportDescendantMemoryUsage):
(WebCore::StyleRuleFontFace::reportDescendantMemoryUsage):
(WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
(WebCore::StyleRuleMedia::reportDescendantMemoryUsage):
(WebCore::StyleRuleRegion::reportDescendantMemoryUsage):
* css/StyleRuleImport.cpp:
(WebCore::StyleRuleImport::reportDescendantMemoryUsage):
* css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::reportMemoryUsage):
* css/WebKitCSSFilterValue.cpp:
(WebCore::WebKitCSSFilterValue::reportDescendantMemoryUsage):
* css/WebKitCSSKeyframeRule.cpp:
(WebCore::StyleKeyframe::reportMemoryUsage):
(WebCore::WebKitCSSKeyframeRule::reportDescendantMemoryUsage):
* css/WebKitCSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
(WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
* css/WebKitCSSMixFunctionValue.cpp:
(WebCore::WebKitCSSMixFunctionValue::reportDescendantMemoryUsage):
* css/WebKitCSSRegionRule.cpp:
(WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
* css/WebKitCSSSVGDocumentValue.cpp:
(WebCore::WebKitCSSSVGDocumentValue::reportDescendantMemoryUsage):
* css/WebKitCSSShaderValue.cpp:
(WebCore::WebKitCSSShaderValue::reportDescendantMemoryUsage):
* css/WebKitCSSTransformValue.cpp:
(WebCore::WebKitCSSTransformValue::reportDescendantMemoryUsage):
* dom/Attribute.h:
(WebCore::Attribute::reportMemoryUsage):
* dom/CharacterData.cpp:
(WebCore::CharacterData::reportMemoryUsage):
* dom/ContainerNode.h:
(WebCore::ContainerNode::reportMemoryUsage):
* dom/Document.cpp:
(WebCore::Document::reportMemoryUsage):
* dom/DocumentEventQueue.cpp:
(WebCore::DocumentEventQueue::reportMemoryUsage):
* dom/Element.h:
(WebCore::Element::reportMemoryUsage):
* dom/ElementAttributeData.cpp:
(WebCore::ElementAttributeData::reportMemoryUsage):
* dom/Event.cpp:
(WebCore::Event::reportMemoryUsage):
* dom/MemoryInstrumentation.cpp:
(WebCore):
* dom/MemoryInstrumentation.h:
(WebCore):
(GenericMemoryTypes):
(WebCore::MemoryInstrumentation::addRootObject):
(WebCore::MemoryObjectInfo::reportObjectInfo):
(WebCoreMemoryTypes):
* dom/Node.cpp:
(WebCore::Node::reportMemoryUsage):
* dom/QualifiedName.h:
(WebCore::QualifiedName::QualifiedNameImpl::reportMemoryUsage):
(WebCore::QualifiedName::reportMemoryUsage):
* html/HTMLImageElement.cpp:
(WebCore::HTMLImageElement::reportMemoryUsage):
* inspector/InspectorMemoryAgent.cpp:
(WebCore):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::reportMemoryUsage):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::reportMemoryUsage):
* loader/MainResourceLoader.cpp:
(WebCore::MainResourceLoader::reportMemoryUsage):
* loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::reportMemoryUsage):
* loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::reportMemoryUsage):
* loader/SubstituteData.cpp:
(WebCore::SubstituteData::reportMemoryUsage):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::reportMemoryUsage):
* loader/cache/CachedFont.cpp:
(WebCore::CachedFont::reportMemoryUsage):
* loader/cache/CachedImage.cpp:
(WebCore::CachedImage::reportMemoryUsage):
* loader/cache/CachedRawResource.cpp:
(WebCore::CachedRawResource::reportMemoryUsage):
* loader/cache/CachedResource.cpp:
(WebCore::CachedResource::reportMemoryUsage):
* loader/cache/CachedResourceHandle.cpp:
(WebCore::CachedResourceHandleBase::reportMemoryUsage):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::reportMemoryUsage):
* loader/cache/CachedSVGDocument.cpp:
(WebCore::CachedSVGDocument::reportMemoryUsage):
* loader/cache/CachedScript.cpp:
(WebCore::CachedScript::reportMemoryUsage):
* loader/cache/CachedShader.cpp:
(WebCore::CachedShader::reportMemoryUsage):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::reportMemoryUsage):
* loader/cache/MemoryCache.cpp:
(WebCore::MemoryCache::reportMemoryUsage):
* page/Frame.cpp:
(WebCore::Frame::reportMemoryUsage):
* platform/SharedBuffer.cpp:
(WebCore::SharedBuffer::reportMemoryUsage):
* platform/TreeShared.h:
(WebCore::TreeShared::reportMemoryUsage):
* platform/graphics/BitmapImage.cpp:
(WebCore::BitmapImage::reportMemoryUsage):
* platform/graphics/CrossfadeGeneratedImage.cpp:
(WebCore::CrossfadeGeneratedImage::reportMemoryUsage):
* platform/graphics/GeneratedImage.cpp:
(WebCore::GeneratedImage::reportMemoryUsage):
* platform/graphics/GeneratorGeneratedImage.cpp:
(WebCore::GeneratorGeneratedImage::reportMemoryUsage):
* platform/graphics/Image.cpp:
(WebCore::Image::reportMemoryUsage):
* platform/network/FormData.cpp:
(WebCore::FormData::reportMemoryUsage):
* platform/network/ResourceRequestBase.cpp:
(WebCore::ResourceRequestBase::reportMemoryUsage):
* platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::reportMemoryUsage):
* rendering/style/RenderStyle.cpp:
(WebCore::RenderStyle::reportMemoryUsage):
* rendering/style/StyleRareInheritedData.cpp:
(WebCore::StyleRareInheritedData::reportMemoryUsage):
* rendering/style/StyleRareNonInheritedData.cpp:
(WebCore::StyleRareNonInheritedData::reportMemoryUsage):
* svg/SVGColor.cpp:
(WebCore::SVGColor::reportDescendantMemoryUsage):
* svg/SVGPaint.cpp:
(WebCore::SVGPaint::reportDescendantMemoryUsage):
* svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::reportMemoryUsage):

Source/WebKit/chromium:

* tests/MemoryInstrumentationTest.cpp:
(WebCore::Instrumented::reportMemoryUsage):
(WebCore::InstrumentedRefPtr::reportMemoryUsage):
(WebCore::InstrumentedWithOwnPtr::reportMemoryUsage):
(WebCore::InstrumentedOther::reportMemoryUsage):
(WebCore::InstrumentedDOM::reportMemoryUsage):
(WebCore::TEST):
(WebCore::NonVirtualInstrumented::reportMemoryUsage):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@127593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
115 files changed:
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptWrappable.h
Source/WebCore/bindings/v8/DOMDataStore.cpp
Source/WebCore/bindings/v8/IntrusiveDOMWrapperMap.h
Source/WebCore/bindings/v8/ScriptWrappable.h
Source/WebCore/bindings/v8/V8Binding.cpp
Source/WebCore/bindings/v8/V8DOMMap.h
Source/WebCore/bindings/v8/V8PerIsolateData.cpp
Source/WebCore/css/CSSAspectRatioValue.cpp
Source/WebCore/css/CSSBorderImageSliceValue.cpp
Source/WebCore/css/CSSCalculationValue.cpp
Source/WebCore/css/CSSCanvasValue.cpp
Source/WebCore/css/CSSCharsetRule.cpp
Source/WebCore/css/CSSComputedStyleDeclaration.cpp
Source/WebCore/css/CSSCrossfadeValue.cpp
Source/WebCore/css/CSSCursorImageValue.cpp
Source/WebCore/css/CSSFontFaceRule.cpp
Source/WebCore/css/CSSFontFaceSrcValue.cpp
Source/WebCore/css/CSSFunctionValue.cpp
Source/WebCore/css/CSSGradientValue.cpp
Source/WebCore/css/CSSImageGeneratorValue.cpp
Source/WebCore/css/CSSImageSetValue.cpp
Source/WebCore/css/CSSImageValue.cpp
Source/WebCore/css/CSSImportRule.cpp
Source/WebCore/css/CSSInheritedValue.cpp
Source/WebCore/css/CSSInitialValue.cpp
Source/WebCore/css/CSSLineBoxContainValue.cpp
Source/WebCore/css/CSSMediaRule.cpp
Source/WebCore/css/CSSPageRule.cpp
Source/WebCore/css/CSSPrimitiveValue.cpp
Source/WebCore/css/CSSProperty.cpp
Source/WebCore/css/CSSReflectValue.cpp
Source/WebCore/css/CSSRule.cpp
Source/WebCore/css/CSSRuleList.cpp
Source/WebCore/css/CSSRuleList.h
Source/WebCore/css/CSSSelectorList.cpp
Source/WebCore/css/CSSStyleRule.cpp
Source/WebCore/css/CSSStyleSheet.cpp
Source/WebCore/css/CSSTimingFunctionValue.cpp
Source/WebCore/css/CSSUnicodeRangeValue.cpp
Source/WebCore/css/CSSUnknownRule.h
Source/WebCore/css/CSSValue.cpp
Source/WebCore/css/CSSValueList.cpp
Source/WebCore/css/CSSVariableValue.h
Source/WebCore/css/FontFeatureValue.cpp
Source/WebCore/css/FontValue.cpp
Source/WebCore/css/MediaList.cpp
Source/WebCore/css/MediaQuery.cpp
Source/WebCore/css/MediaQueryExp.cpp
Source/WebCore/css/PropertySetCSSStyleDeclaration.cpp
Source/WebCore/css/ShadowValue.cpp
Source/WebCore/css/StylePropertySet.cpp
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleRule.cpp
Source/WebCore/css/StyleRuleImport.cpp
Source/WebCore/css/StyleSheetContents.cpp
Source/WebCore/css/WebKitCSSFilterValue.cpp
Source/WebCore/css/WebKitCSSKeyframeRule.cpp
Source/WebCore/css/WebKitCSSKeyframesRule.cpp
Source/WebCore/css/WebKitCSSMixFunctionValue.cpp
Source/WebCore/css/WebKitCSSRegionRule.cpp
Source/WebCore/css/WebKitCSSSVGDocumentValue.cpp
Source/WebCore/css/WebKitCSSShaderValue.cpp
Source/WebCore/css/WebKitCSSTransformValue.cpp
Source/WebCore/dom/Attribute.h
Source/WebCore/dom/CharacterData.cpp
Source/WebCore/dom/ContainerNode.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/DocumentEventQueue.cpp
Source/WebCore/dom/Element.h
Source/WebCore/dom/ElementAttributeData.cpp
Source/WebCore/dom/Event.cpp
Source/WebCore/dom/MemoryInstrumentation.cpp
Source/WebCore/dom/MemoryInstrumentation.h
Source/WebCore/dom/Node.cpp
Source/WebCore/dom/QualifiedName.h
Source/WebCore/html/HTMLImageElement.cpp
Source/WebCore/inspector/InspectorMemoryAgent.cpp
Source/WebCore/loader/DocumentLoader.cpp
Source/WebCore/loader/FrameLoader.cpp
Source/WebCore/loader/MainResourceLoader.cpp
Source/WebCore/loader/ResourceLoader.cpp
Source/WebCore/loader/SubresourceLoader.cpp
Source/WebCore/loader/SubstituteData.cpp
Source/WebCore/loader/cache/CachedCSSStyleSheet.cpp
Source/WebCore/loader/cache/CachedFont.cpp
Source/WebCore/loader/cache/CachedImage.cpp
Source/WebCore/loader/cache/CachedRawResource.cpp
Source/WebCore/loader/cache/CachedResource.cpp
Source/WebCore/loader/cache/CachedResourceHandle.cpp
Source/WebCore/loader/cache/CachedResourceLoader.cpp
Source/WebCore/loader/cache/CachedSVGDocument.cpp
Source/WebCore/loader/cache/CachedScript.cpp
Source/WebCore/loader/cache/CachedShader.cpp
Source/WebCore/loader/cache/CachedXSLStyleSheet.cpp
Source/WebCore/loader/cache/MemoryCache.cpp
Source/WebCore/page/Frame.cpp
Source/WebCore/platform/SharedBuffer.cpp
Source/WebCore/platform/TreeShared.h
Source/WebCore/platform/graphics/BitmapImage.cpp
Source/WebCore/platform/graphics/CrossfadeGeneratedImage.cpp
Source/WebCore/platform/graphics/GeneratedImage.cpp
Source/WebCore/platform/graphics/GeneratorGeneratedImage.cpp
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/network/FormData.cpp
Source/WebCore/platform/network/ResourceRequestBase.cpp
Source/WebCore/platform/network/ResourceResponseBase.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Source/WebCore/svg/SVGColor.cpp
Source/WebCore/svg/SVGPaint.cpp
Source/WebCore/svg/graphics/SVGImage.cpp
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/tests/MemoryInstrumentationTest.cpp