Commit 53b3ffda authored by loislo@chromium.org's avatar loislo@chromium.org

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: http://svn.webkit.org/repository/webkit/trunk@127593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent db0e2582
This diff is collapsed.
......@@ -57,7 +57,7 @@ public:
void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
info.addMember(m_wrapper);
}
......
......@@ -121,7 +121,7 @@ void* DOMDataStore::getDOMWrapperMap(DOMWrapperMapType type)
void DOMDataStore::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
info.addInstrumentedMember(m_domNodeMap);
info.addInstrumentedMember(m_activeDomNodeMap);
info.addInstrumentedMember(m_domObjectMap);
......
......@@ -104,7 +104,7 @@ class ChunkedTable {
void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
for (Chunk* chunk = m_chunks; chunk; chunk = chunk->m_previous)
info.addMember(chunk);
}
......@@ -186,7 +186,7 @@ public:
virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
info.addInstrumentedMember(m_table);
}
......
......@@ -55,7 +55,7 @@ public:
void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::DOM);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::DOM);
info.addMember(m_wrapper);
}
......
......@@ -219,7 +219,7 @@ v8::Persistent<v8::FunctionTemplate> createRawTemplate()
void StringCache::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
info.addHashMap(m_stringCache);
}
......
......@@ -136,7 +136,7 @@ namespace WebCore {
virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
info.addHashMap(m_map);
}
......
......@@ -75,7 +75,7 @@ void V8PerIsolateData::dispose(v8::Isolate* isolate)
void V8PerIsolateData::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::Binding);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Binding);
info.addHashMap(m_rawTemplates);
info.addHashMap(m_templates);
info.addInstrumentedMember(m_stringCache);
......
......@@ -45,7 +45,7 @@ String CSSAspectRatioValue::customCssText() const
void CSSAspectRatioValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
}
......@@ -52,7 +52,7 @@ String CSSBorderImageSliceValue::customCssText() const
void CSSBorderImageSliceValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_slices);
}
......
......@@ -109,7 +109,7 @@ bool CSSCalcValue::hasVariableReference() const
void CSSCalcValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
double CSSCalcValue::clampToPermittedRange(double value) const
......@@ -224,7 +224,7 @@ public:
virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_value);
}
......@@ -322,7 +322,7 @@ public:
virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_leftSide);
info.addInstrumentedMember(m_rightSide);
}
......
......@@ -98,7 +98,7 @@ PassRefPtr<Image> CSSCanvasValue::image(RenderObject* renderer, const IntSize& /
void CSSCanvasValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_name);
info.addInstrumentedMember(m_element);
......
......@@ -38,7 +38,7 @@ String CSSCharsetRule::cssText() const
void CSSCharsetRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_encoding);
}
......
......@@ -2731,7 +2731,7 @@ PassRefPtr<StylePropertySet> CSSComputedStyleDeclaration::copyPropertiesInSet(co
void CSSComputedStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_node);
}
......
......@@ -141,7 +141,7 @@ void CSSCrossfadeValue::loadSubimages(CachedResourceLoader* cachedResourceLoader
void CSSCrossfadeValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_fromValue);
info.addInstrumentedMember(m_toValue);
......
......@@ -135,7 +135,7 @@ void CSSCursorImageValue::removeReferencedElement(SVGElement* element)
void CSSCursorImageValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSImageValue::reportDescendantMemoryUsage(memoryObjectInfo);
#if ENABLE(SVG)
info.addInstrumentedHashSet(m_referencedElements);
......
......@@ -70,7 +70,7 @@ void CSSFontFaceRule::reattach(StyleRuleFontFace* rule)
void CSSFontFaceRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_fontFaceRule);
info.addInstrumentedMember(m_propertiesCSSOMWrapper);
......
......@@ -103,7 +103,7 @@ CachedFont* CSSFontFaceSrcValue::cachedFont(Document* document)
void CSSFontFaceSrcValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_resource);
info.addInstrumentedMember(m_format);
// FIXME: add m_cachedFont when MemoryCache is instrumented.
......
......@@ -54,7 +54,7 @@ String CSSFunctionValue::customCssText() const
void CSSFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_name);
info.addInstrumentedMember(m_args);
}
......
......@@ -46,7 +46,7 @@ namespace WebCore {
void CSSGradientColorStop::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_position);
info.addInstrumentedMember(m_color);
}
......@@ -463,7 +463,7 @@ bool CSSGradientValue::isCacheable() const
void CSSGradientValue::reportBaseClassMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSImageGeneratorValue::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_firstX);
info.addInstrumentedMember(m_firstY);
......@@ -636,7 +636,7 @@ PassRefPtr<Gradient> CSSLinearGradientValue::createGradient(RenderObject* render
void CSSLinearGradientValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_angle);
}
......@@ -961,7 +961,7 @@ PassRefPtr<Gradient> CSSRadialGradientValue::createGradient(RenderObject* render
void CSSRadialGradientValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSGradientValue::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_firstRadius);
info.addInstrumentedMember(m_secondRadius);
......
......@@ -111,7 +111,7 @@ void CSSImageGeneratorValue::putImage(const IntSize& size, PassRefPtr<Image> ima
void CSSImageGeneratorValue::reportBaseClassMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addHashCountedSet(m_sizes);
info.addHashMap(m_clients);
info.addHashMap(m_images); // FIXME: instrument Image
......
......@@ -166,14 +166,14 @@ PassRefPtr<CSSImageSetValue> CSSImageSetValue::cloneForCSSOM() const
void CSSImageSetValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSValueList::reportDescendantMemoryUsage(memoryObjectInfo);
info.addInstrumentedVector(m_imagesInSet);
}
void CSSImageSetValue::ImageWithScale::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(imageURL);
}
......
......@@ -128,7 +128,7 @@ PassRefPtr<CSSValue> CSSImageValue::cloneForCSSOM() const
void CSSImageValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_url);
// No need to report m_image as it is counted as part of RenderArena.
}
......
......@@ -79,7 +79,7 @@ String CSSImportRule::cssText() const
void CSSImportRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_importRule);
info.addInstrumentedMember(m_mediaCSSOMWrapper);
......
......@@ -33,7 +33,7 @@ String CSSInheritedValue::customCssText() const
void CSSInheritedValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
} // namespace WebCore
......@@ -33,7 +33,7 @@ String CSSInitialValue::customCssText() const
void CSSInitialValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
} // namespace WebCore
......@@ -76,7 +76,7 @@ String CSSLineBoxContainValue::customCssText() const
void CSSLineBoxContainValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
}
......@@ -177,7 +177,7 @@ void CSSMediaRule::reattach(StyleRuleMedia* rule)
void CSSMediaRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_mediaCSSOMWrapper);
info.addInstrumentedVector(m_childRuleCSSOMWrappers);
......
......@@ -104,7 +104,7 @@ void CSSPageRule::reattach(StyleRulePage* rule)
void CSSPageRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_pageRule);
info.addInstrumentedMember(m_propertiesCSSOMWrapper);
......
......@@ -1249,7 +1249,7 @@ PassRefPtr<CSSPrimitiveValue> CSSPrimitiveValue::cloneForCSSOM() const
void CSSPrimitiveValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
switch (m_primitiveUnitType) {
case CSS_ATTR:
case CSS_COUNTER_NAME:
......
......@@ -714,7 +714,7 @@ bool CSSProperty::isInheritedProperty(CSSPropertyID propertyID)
void CSSProperty::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_value);
}
......
......@@ -70,7 +70,7 @@ void CSSReflectValue::addSubresourceStyleURLs(ListHashSet<KURL>& urls, const Sty
void CSSReflectValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_offset);
info.addInstrumentedMember(m_mask);
}
......
......@@ -212,7 +212,7 @@ const CSSParserContext& CSSRule::parserContext() const
void CSSRule::reportBaseClassMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
if (m_parentIsRule)
info.addInstrumentedMember(m_parentRule);
else
......
......@@ -53,7 +53,7 @@ void StaticCSSRuleList::deref()
void StaticCSSRuleList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedVector(m_rules);
}
......
......@@ -88,7 +88,7 @@ public:
virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_rule);
}
......
......@@ -145,7 +145,7 @@ String CSSSelectorList::selectorsText() const
void CSSSelectorList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addRawBuffer(m_selectorArray, length() * sizeof(CSSSelector));
}
......
......@@ -131,7 +131,7 @@ void CSSStyleRule::reattach(StyleRule* rule)
void CSSStyleRule::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_styleRule);
info.addInstrumentedMember(m_propertiesCSSOMWrapper);
......
......@@ -58,7 +58,7 @@ private:
virtual void reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const OVERRIDE
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_styleSheet);
}
......@@ -184,7 +184,7 @@ void CSSStyleSheet::reattachCSSOMWrappers()
void CSSStyleSheet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_contents);
info.addInstrumentedMember(m_title);
info.addInstrumentedMember(m_mediaQueries);
......
......@@ -38,7 +38,7 @@ String CSSLinearTimingFunctionValue::customCssText() const
void CSSLinearTimingFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
String CSSCubicBezierTimingFunctionValue::customCssText() const
......@@ -52,7 +52,7 @@ String CSSCubicBezierTimingFunctionValue::customCssText() const
void CSSCubicBezierTimingFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
String CSSStepsTimingFunctionValue::customCssText() const
......@@ -62,7 +62,7 @@ String CSSStepsTimingFunctionValue::customCssText() const
void CSSStepsTimingFunctionValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
} // namespace WebCore
......@@ -40,7 +40,7 @@ String CSSUnicodeRangeValue::customCssText() const
void CSSUnicodeRangeValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
}
}
......@@ -33,7 +33,7 @@ public:
void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
CSSRule::reportBaseClassMemoryUsage(memoryObjectInfo);
}
};
......
......@@ -81,7 +81,7 @@ public:
void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_cssText);
}
......
......@@ -189,7 +189,7 @@ PassRefPtr<CSSValueList> CSSValueList::cloneForCSSOM() const
void CSSValueList::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedVector(m_values);
}
......
......@@ -50,7 +50,7 @@ public:
void reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_name);
info.addInstrumentedMember(m_value);
}
......
......@@ -52,7 +52,7 @@ String FontFeatureValue::customCssText() const
void FontFeatureValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_tag);
}
......
......@@ -68,7 +68,7 @@ String FontValue::customCssText() const
void FontValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(style);
info.addInstrumentedMember(variant);
info.addInstrumentedMember(weight);
......
......@@ -214,7 +214,7 @@ String MediaQuerySet::mediaText() const
void MediaQuerySet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedVector(m_queries);
}
......@@ -292,7 +292,7 @@ void MediaList::reattach(MediaQuerySet* mediaQueries)
void MediaList::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_mediaQueries);
}
......
......@@ -136,7 +136,7 @@ String MediaQuery::cssText() const
void MediaQuery::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_mediaType);
info.addInstrumentedVectorPtr(m_expressions);
info.addInstrumentedMember(m_serializationCache);
......
......@@ -111,7 +111,7 @@ String MediaQueryExp::serialize() const
void MediaQueryExp::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_mediaFeature);
info.addInstrumentedMember(m_serializationCache);
info.addInstrumentedMember(m_value);
......
......@@ -171,7 +171,7 @@ void PropertySetCSSStyleDeclaration::deref()
void PropertySetCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(m_propertySet);
if (m_cssomCSSValueClones)
info.addInstrumentedMapEntries(*m_cssomCSSValueClones);
......@@ -430,14 +430,14 @@ void StyleRuleCSSStyleDeclaration::reattach(StylePropertySet* propertySet)
void StyleRuleCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
PropertySetCSSStyleDeclaration::reportMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_parentRule);
}
void InlineCSSStyleDeclaration::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
PropertySetCSSStyleDeclaration::reportMemoryUsage(memoryObjectInfo);
info.addInstrumentedMember(m_parentElement);
}
......
......@@ -81,7 +81,7 @@ String ShadowValue::customCssText() const
void ShadowValue::reportDescendantMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS);
info.addInstrumentedMember(x);
info.addInstrumentedMember(y);
info.addInstrumentedMember(blur);
......
......@@ -1119,7 +1119,7 @@ unsigned StylePropertySet::averageSizeInBytes()
void StylePropertySet::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
{
size_t actualSize = m_isMutable ? sizeof(StylePropertySet) : immutableStylePropertySetSize(m_arraySize);
MemoryClassInfo info(memoryObjectInfo, this, MemoryInstrumentation::CSS, actualSize);
MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::CSS, actualSize);
if (m_isMutable)
info.addVectorPtr(m_mutablePropertyVector);