Skip to content
  • yurys@chromium.org's avatar
    Memory instrumentation: extract MemoryObjectInfo declaration into a separate file · 962a51ac
    yurys@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=102510
    
    Reviewed by Pavel Feldman.
    
    Source/JavaScriptCore:
    
    Added new symbols for the methods that have moved into .../wtf/MemoryInstrumentation.cpp
    
    * JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def:
    
    Source/WebCore:
    
    Added necessary includes where MemoryObjectInfo declaration is required.
    
    * platform/audio/FFTFrame.cpp:
    * rendering/style/RenderStyle.cpp:
    * rendering/style/StyleRareInheritedData.cpp:
    * rendering/style/StyleRareNonInheritedData.cpp:
    
    Source/WTF:
    
    Moved MemoryObjectInfo into separate header. Moved definition of MemoryInstrumentation
    methods that depend on MemoryObjectInfo declaration into MemoryInstrumentation.cpp to
    make MemoryInstrumentation require only forward declaration of MemoryObjectInfo.
    
    * GNUmakefile.list.am:
    * WTF.gypi:
    * WTF.pro:
    * WTF.vcproj/WTF.vcproj:
    * wtf/CMakeLists.txt:
    * wtf/MemoryInstrumentation.cpp: Added.
    (WTF):
    (WTF::MemoryInstrumentation::MemoryInstrumentation):
    (WTF::MemoryInstrumentation::~MemoryInstrumentation):
    (WTF::MemoryInstrumentation::getObjectType): this method allows to get object type without
    pulling in MemoryObjectInfo.h and all its dependencies.
    (WTF::MemoryInstrumentation::callReportObjectInfo):
    (WTF::MemoryInstrumentation::InstrumentedPointerBase::InstrumentedPointerBase):
    (WTF::MemoryInstrumentation::InstrumentedPointerBase::process):
    (WTF::MemoryClassInfo::init):
    (WTF::MemoryClassInfo::addRawBuffer):
    (WTF::MemoryClassInfo::addPrivateBuffer):
    * wtf/MemoryInstrumentation.h:
    (MemoryInstrumentation):
    (WTF::MemoryInstrumentation::addRootObject):
    (InstrumentedPointerBase):
    (WTF::MemoryInstrumentation::reportObjectMemoryUsage):
    (InstrumentedPointer):
    (WTF::MemoryInstrumentation::addObject): we now pass owner's MemoryObjectInfo in all places
    where we report objects pointed by the owner.
    (WTF::MemoryInstrumentation::OwningTraits::addObject):
    (WTF::MemoryClassInfo::MemoryClassInfo):
    (WTF::MemoryClassInfo::addMember):
    (MemoryClassInfo):
    (WTF::MemoryInstrumentation::addObjectImpl):
    (WTF::::InstrumentedPointer):
    (WTF::::callReportMemoryUsage):
    * wtf/MemoryObjectInfo.h: Added.
    (WTF):
    (MemoryObjectInfo):
    (WTF::MemoryObjectInfo::MemoryObjectInfo):
    (WTF::MemoryObjectInfo::objectType):
    (WTF::MemoryObjectInfo::objectSize):
    (WTF::MemoryObjectInfo::reportedPointer):
    (WTF::MemoryObjectInfo::memoryInstrumentation):
    (WTF::MemoryObjectInfo::reportObjectInfo):
    
    Tools:
    
    Added missing includes.
    
    * TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@135603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    962a51ac