Skip to content
  • yurys@chromium.org's avatar
    Web Inspector: provide memory instrumentation for ListHashSet · c129c71f
    yurys@chromium.org authored
    https://bugs.webkit.org/show_bug.cgi?id=97786
    
    Reviewed by Vsevolod Vlasov.
    
    Source/WebCore:
    
    Switched existing usages of addListHashSet to the generic instrumentation mechanism
    as it should work just just fine now that there is a memory instrumentation of
    ListHashSet.
    
    * dom/DocumentEventQueue.cpp:
    * dom/DocumentStyleSheetCollection.cpp:
    (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
    * loader/cache/CachedResourceLoader.cpp:
    (WebCore::CachedResourceLoader::reportMemoryUsage):
    
    Source/WebKit/chromium:
    
    Added a test for ListHashSet memory instrumentation.
    
    * tests/MemoryInstrumentationTest.cpp:
    (WebCore::TEST):
    (WebCore):
    
    Source/WTF:
    
    Added memory instrumentation for ListHashSet.
    
    * GNUmakefile.list.am:
    * WTF.gypi:
    * WTF.pro:
    * WTF.vcproj/WTF.vcproj:
    * WTF.xcodeproj/project.pbxproj:
    * wtf/HashSet.h:
    (WTF):
    * wtf/ListHashSet.h:
    (ListHashSet):
    (ListHashSetNodeAllocator): changed visibility of inPool method to public
    (WTF::ListHashSetNodeAllocator::pool):
    (WTF::ListHashSetNodeAllocator::pastPool):
    (WTF::::sizeInBytes): added a method that returns size of the set in bytes including
    all its internals but not the content elements.
    (WTF):
    * wtf/MemoryInstrumentation.h: removed onsolete method. All clients were updated to
    use generic addMember instead.
    (MemoryInstrumentation):
    (WTF::MemoryClassInfo::addPrivateBuffer):
    * wtf/MemoryInstrumentationHashSet.h:
    * wtf/MemoryInstrumentationListHashSet.h: Copied from Source/WTF/wtf/MemoryInstrumentationHashSet.h.
    (WTF):
    (WTF::reportMemoryUsage):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@132331 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    c129c71f