Changeset 132730 in webkit


Ignore:
Timestamp:
Oct 27, 2012, 10:15:47 AM (12 years ago)
Author:
loislo@chromium.org
Message:

Unreviewed, rolling out r132725.
http://trac.webkit.org/changeset/132725
https://bugs.webkit.org/show_bug.cgi?id=100596

it broke linking on chromium debug bots (Requested by loislo
on #webkit).

Patch by Sheriff Bot <webkit.review.bot@gmail.com> on 2012-10-27

  • inspector/InspectorMemoryAgent.cpp:

(WebCore::addPlatformComponentsInfo):
(WebCore):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):

  • platform/MemoryUsageSupport.cpp:

(WebCore::MemoryUsageSupport::memoryUsageByComponents):

  • platform/MemoryUsageSupport.h:

(ComponentInfo):
(WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo):
(MemoryUsageSupport):

  • platform/PlatformMemoryInstrumentation.cpp:

(WebCore):

  • platform/PlatformMemoryInstrumentation.h:

(PlatformMemoryTypes):

  • platform/chromium/MemoryUsageSupportChromium.cpp:

(WebCore::MemoryUsageSupport::memoryUsageByComponents):

  • platform/qt/MemoryUsageSupportQt.cpp:

(WebCore::MemoryUsageSupport::memoryUsageByComponents):

Location:
trunk/Source/WebCore
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r132729 r132730  
     12012-10-27  Sheriff Bot  <webkit.review.bot@gmail.com>
     2
     3        Unreviewed, rolling out r132725.
     4        http://trac.webkit.org/changeset/132725
     5        https://bugs.webkit.org/show_bug.cgi?id=100596
     6
     7        it broke linking on chromium debug bots (Requested by loislo
     8        on #webkit).
     9
     10        * inspector/InspectorMemoryAgent.cpp:
     11        (WebCore::addPlatformComponentsInfo):
     12        (WebCore):
     13        (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
     14        * platform/MemoryUsageSupport.cpp:
     15        (WebCore::MemoryUsageSupport::memoryUsageByComponents):
     16        * platform/MemoryUsageSupport.h:
     17        (ComponentInfo):
     18        (WebCore::MemoryUsageSupport::ComponentInfo::ComponentInfo):
     19        (MemoryUsageSupport):
     20        * platform/PlatformMemoryInstrumentation.cpp:
     21        (WebCore):
     22        * platform/PlatformMemoryInstrumentation.h:
     23        (PlatformMemoryTypes):
     24        * platform/chromium/MemoryUsageSupportChromium.cpp:
     25        (WebCore::MemoryUsageSupport::memoryUsageByComponents):
     26        * platform/qt/MemoryUsageSupportQt.cpp:
     27        (WebCore::MemoryUsageSupport::memoryUsageByComponents):
     28
    1292012-10-27  Dan Bernstein  <mitz@apple.com>
    230
  • trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp

    r132725 r132730  
    514514}
    515515
     516static void addPlatformComponentsInfo(PassRefPtr<InspectorMemoryBlocks> children)
     517{
     518    Vector<MemoryUsageSupport::ComponentInfo> components;
     519    MemoryUsageSupport::memoryUsageByComponents(components);
     520    for (Vector<MemoryUsageSupport::ComponentInfo>::iterator it = components.begin(); it != components.end(); ++it) {
     521        RefPtr<InspectorMemoryBlock> block = InspectorMemoryBlock::create().setName(it->m_name);
     522        block->setSize(it->m_sizeInBytes);
     523        children->addItem(block);
     524    }
     525}
     526
    516527void InspectorMemoryAgent::getProcessMemoryDistribution(ErrorString*, RefPtr<InspectorMemoryBlock>& processMemory)
    517528{
     
    524535    collectDomTreeInfo(memoryInstrumentation, m_page); // FIXME: collect for all pages?
    525536
    526     MemoryUsageSupport::reportMemoryUsage(&memoryInstrumentation);
     537    RefPtr<InspectorMemoryBlocks> children = InspectorMemoryBlocks::create();
     538    addPlatformComponentsInfo(children);
    527539
    528540    memoryInstrumentation.addRootObject(this);
     
    532544    m_inspectorClient->dumpUncountedAllocatedObjects(memoryInstrumentationClient.countedObjects());
    533545
    534     RefPtr<InspectorMemoryBlocks> children = InspectorMemoryBlocks::create();
    535546    MemoryUsageStatsGenerator statsGenerator(&memoryInstrumentationClient);
    536547    statsGenerator.dump(children.get());
  • trunk/Source/WebCore/platform/MemoryUsageSupport.cpp

    r132725 r132730  
    6464}
    6565
    66 void MemoryUsageSupport::reportMemoryUsage(MemoryInstrumentation*)
     66void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>&)
    6767{
    6868}
  • trunk/Source/WebCore/platform/MemoryUsageSupport.h

    r132725 r132730  
    6262    static bool processMemorySizesInBytes(size_t* privateBytes, size_t* sharedBytes);
    6363
    64     // Reports memory objects used by platform.
    65     static void reportMemoryUsage(MemoryInstrumentation*);
     64    class ComponentInfo {
     65    public:
     66        ComponentInfo(const String& name, size_t size) : m_name(name), m_sizeInBytes(size) { }
     67
     68        const String m_name;
     69        size_t m_sizeInBytes;
     70    };
     71
     72    // Reports private memory used by components in bytes.
     73    static void memoryUsageByComponents(Vector<ComponentInfo>&);
    6674};
    6775
  • trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.cpp

    r132725 r132730  
    3636MemoryObjectType PlatformMemoryTypes::Image = "Page.Image";
    3737MemoryObjectType PlatformMemoryTypes::Loader = "Page.Loader";
    38 MemoryObjectType PlatformMemoryTypes::GlyphCache = "MemoryCache.GlyphCache";
    3938
    4039} // namespace WebCore
  • trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.h

    r132725 r132730  
    4444    static MemoryObjectType Image;
    4545    static MemoryObjectType Loader;
    46     static MemoryObjectType GlyphCache;
    4746};
    4847
  • trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp

    r132725 r132730  
    3232#include "MemoryUsageSupport.h"
    3333
    34 #include "PlatformMemoryInstrumentation.h"
    35 #include <SkGlyphCache.h>
    3634#include <SkGraphics.h>
    3735#include <public/Platform.h>
    38 
    39 void reportMemoryUsage(const SkGlyphCache* const& glyphCache, WTF::MemoryObjectInfo* memoryObjectInfo)
    40 {
    41     WTF::MemoryClassInfo info(memoryObjectInfo, glyphCache, WebCore::PlatformMemoryTypes::GlyphCache);
    42     info.addMember(&glyphCache->getDescriptor());
    43     info.addMember(glyphCache->getScalerContext());
    44 }
    4536
    4637namespace WebCore {
     
    7667}
    7768
    78 static bool reportGlyphCache(SkGlyphCache* glyphCache, void* ctx)
     69void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>& components)
    7970{
    80     MemoryInstrumentation* memoryInstrumentation = reinterpret_cast<MemoryInstrumentation*>(ctx);
    81     memoryInstrumentation->addRootObject(glyphCache);
    82     return false;
    83 }
    84 
    85 void MemoryUsageSupport::reportMemoryUsage(MemoryInstrumentation* memoryInstrumentation)
    86 {
    87     SkGlyphCache::VisitAllCaches(reportGlyphCache, memoryInstrumentation);
     71    size_t size = SkGraphics::GetFontCacheUsed();
     72    components.append(ComponentInfo("GlyphCache", size));
    8873}
    8974
  • trunk/Source/WebCore/platform/qt/MemoryUsageSupportQt.cpp

    r132725 r132730  
    112112}
    113113
    114 void MemoryUsageSupport::reportMemoryUsage(MemoryInstrumentation* memoryInstrumentation)
     114void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>&)
    115115{
    116116}
Note: See TracChangeset for help on using the changeset viewer.