Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
authoryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2012 14:08:00 +0000 (14:08 +0000)
committeryurys@chromium.org <yurys@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 23 Nov 2012 14:08:00 +0000 (14:08 +0000)
commitc6f663e2ed4d334825892dc6a41532b6caac10e5
treeaa72bd9b91f20361b7ab12833d8fe11ea9468612
parentac2c4bd603b18a9aea39b12f70226aedfab80d82
Memory instrumentation: extract MemoryObjectInfo declaration into a separate file
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: https://svn.webkit.org/repository/webkit/trunk@135603 268f45cc-cd09-0410-ab3c-d52691b4dbfc
20 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.def
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/CMakeLists.txt
Source/WTF/wtf/MemoryInstrumentation.cpp [new file with mode: 0644]
Source/WTF/wtf/MemoryInstrumentation.h
Source/WTF/wtf/MemoryObjectInfo.h [new file with mode: 0644]
Source/WebCore/ChangeLog
Source/WebCore/platform/audio/FFTFrame.cpp
Source/WebCore/rendering/style/RenderStyle.cpp
Source/WebCore/rendering/style/StyleRareInheritedData.cpp
Source/WebCore/rendering/style/StyleRareNonInheritedData.cpp
Tools/ChangeLog
Tools/TestWebKitAPI/GNUmakefile.am
Tools/TestWebKitAPI/Tests/WTF/MemoryInstrumentationTest.cpp