Title: [132730] trunk/Source/WebCore
Revision
132730
Author
loi...@chromium.org
Date
2012-10-27 10:15:47 -0700 (Sat, 27 Oct 2012)

Log 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....@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):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (132729 => 132730)


--- trunk/Source/WebCore/ChangeLog	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/ChangeLog	2012-10-27 17:15:47 UTC (rev 132730)
@@ -1,3 +1,31 @@
+2012-10-27  Sheriff Bot  <webkit.review....@gmail.com>
+
+        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).
+
+        * 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):
+
 2012-10-27  Dan Bernstein  <m...@apple.com>
 
         REAL_PLATFORM_NAME build setting is no longer needed

Modified: trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp (132729 => 132730)


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2012-10-27 17:15:47 UTC (rev 132730)
@@ -513,6 +513,17 @@
     domTreesIterator.visitMemoryCache();
 }
 
+static void addPlatformComponentsInfo(PassRefPtr<InspectorMemoryBlocks> children)
+{
+    Vector<MemoryUsageSupport::ComponentInfo> components;
+    MemoryUsageSupport::memoryUsageByComponents(components);
+    for (Vector<MemoryUsageSupport::ComponentInfo>::iterator it = components.begin(); it != components.end(); ++it) {
+        RefPtr<InspectorMemoryBlock> block = InspectorMemoryBlock::create().setName(it->m_name);
+        block->setSize(it->m_sizeInBytes);
+        children->addItem(block);
+    }
+}
+
 void InspectorMemoryAgent::getProcessMemoryDistribution(ErrorString*, RefPtr<InspectorMemoryBlock>& processMemory)
 {
     MemoryInstrumentationClientImpl memoryInstrumentationClient;
@@ -523,7 +534,8 @@
     reportRenderTreeInfo(memoryInstrumentationClient, m_page);
     collectDomTreeInfo(memoryInstrumentation, m_page); // FIXME: collect for all pages?
 
-    MemoryUsageSupport::reportMemoryUsage(&memoryInstrumentation);
+    RefPtr<InspectorMemoryBlocks> children = InspectorMemoryBlocks::create();
+    addPlatformComponentsInfo(children);
 
     memoryInstrumentation.addRootObject(this);
     memoryInstrumentation.addRootObject(memoryInstrumentation);
@@ -531,7 +543,6 @@
 
     m_inspectorClient->dumpUncountedAllocatedObjects(memoryInstrumentationClient.countedObjects());
 
-    RefPtr<InspectorMemoryBlocks> children = InspectorMemoryBlocks::create();
     MemoryUsageStatsGenerator statsGenerator(&memoryInstrumentationClient);
     statsGenerator.dump(children.get());
 

Modified: trunk/Source/WebCore/platform/MemoryUsageSupport.cpp (132729 => 132730)


--- trunk/Source/WebCore/platform/MemoryUsageSupport.cpp	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/platform/MemoryUsageSupport.cpp	2012-10-27 17:15:47 UTC (rev 132730)
@@ -63,7 +63,7 @@
     return false;
 }
 
-void MemoryUsageSupport::reportMemoryUsage(MemoryInstrumentation*)
+void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>&)
 {
 }
 

Modified: trunk/Source/WebCore/platform/MemoryUsageSupport.h (132729 => 132730)


--- trunk/Source/WebCore/platform/MemoryUsageSupport.h	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/platform/MemoryUsageSupport.h	2012-10-27 17:15:47 UTC (rev 132730)
@@ -61,8 +61,16 @@
     // false on platform specific error conditions.
     static bool processMemorySizesInBytes(size_t* privateBytes, size_t* sharedBytes);
 
-    // Reports memory objects used by platform.
-    static void reportMemoryUsage(MemoryInstrumentation*);
+    class ComponentInfo {
+    public:
+        ComponentInfo(const String& name, size_t size) : m_name(name), m_sizeInBytes(size) { }
+
+        const String m_name;
+        size_t m_sizeInBytes;
+    };
+
+    // Reports private memory used by components in bytes.
+    static void memoryUsageByComponents(Vector<ComponentInfo>&);
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.cpp (132729 => 132730)


--- trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.cpp	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.cpp	2012-10-27 17:15:47 UTC (rev 132730)
@@ -35,6 +35,5 @@
 
 MemoryObjectType PlatformMemoryTypes::Image = "Page.Image";
 MemoryObjectType PlatformMemoryTypes::Loader = "Page.Loader";
-MemoryObjectType PlatformMemoryTypes::GlyphCache = "MemoryCache.GlyphCache";
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.h (132729 => 132730)


--- trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.h	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.h	2012-10-27 17:15:47 UTC (rev 132730)
@@ -43,7 +43,6 @@
 public:
     static MemoryObjectType Image;
     static MemoryObjectType Loader;
-    static MemoryObjectType GlyphCache;
 };
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp (132729 => 132730)


--- trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp	2012-10-27 17:15:47 UTC (rev 132730)
@@ -31,18 +31,9 @@
 #include "config.h"
 #include "MemoryUsageSupport.h"
 
-#include "PlatformMemoryInstrumentation.h"
-#include <SkGlyphCache.h>
 #include <SkGraphics.h>
 #include <public/Platform.h>
 
-void reportMemoryUsage(const SkGlyphCache* const& glyphCache, WTF::MemoryObjectInfo* memoryObjectInfo)
-{
-    WTF::MemoryClassInfo info(memoryObjectInfo, glyphCache, WebCore::PlatformMemoryTypes::GlyphCache);
-    info.addMember(&glyphCache->getDescriptor());
-    info.addMember(glyphCache->getScalerContext());
-}
-
 namespace WebCore {
 
 int MemoryUsageSupport::memoryUsageMB()
@@ -75,16 +66,10 @@
     return WebKit::Platform::current()->processMemorySizesInBytes(privateBytes, sharedBytes);
 }
 
-static bool reportGlyphCache(SkGlyphCache* glyphCache, void* ctx)
+void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>& components)
 {
-    MemoryInstrumentation* memoryInstrumentation = reinterpret_cast<MemoryInstrumentation*>(ctx);
-    memoryInstrumentation->addRootObject(glyphCache);
-    return false;
+    size_t size = SkGraphics::GetFontCacheUsed();
+    components.append(ComponentInfo("GlyphCache", size));
 }
 
-void MemoryUsageSupport::reportMemoryUsage(MemoryInstrumentation* memoryInstrumentation)
-{
-    SkGlyphCache::VisitAllCaches(reportGlyphCache, memoryInstrumentation);
-}
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/qt/MemoryUsageSupportQt.cpp (132729 => 132730)


--- trunk/Source/WebCore/platform/qt/MemoryUsageSupportQt.cpp	2012-10-27 16:14:53 UTC (rev 132729)
+++ trunk/Source/WebCore/platform/qt/MemoryUsageSupportQt.cpp	2012-10-27 17:15:47 UTC (rev 132730)
@@ -111,7 +111,7 @@
     return false;
 }
 
-void MemoryUsageSupport::reportMemoryUsage(MemoryInstrumentation* memoryInstrumentation)
+void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>&)
 {
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to