Changeset 132730 in webkit
- Timestamp:
- Oct 27, 2012, 10:15:47 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r132729 r132730 1 2012-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 1 29 2012-10-27 Dan Bernstein <mitz@apple.com> 2 30 -
trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp
r132725 r132730 514 514 } 515 515 516 static 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 516 527 void InspectorMemoryAgent::getProcessMemoryDistribution(ErrorString*, RefPtr<InspectorMemoryBlock>& processMemory) 517 528 { … … 524 535 collectDomTreeInfo(memoryInstrumentation, m_page); // FIXME: collect for all pages? 525 536 526 MemoryUsageSupport::reportMemoryUsage(&memoryInstrumentation); 537 RefPtr<InspectorMemoryBlocks> children = InspectorMemoryBlocks::create(); 538 addPlatformComponentsInfo(children); 527 539 528 540 memoryInstrumentation.addRootObject(this); … … 532 544 m_inspectorClient->dumpUncountedAllocatedObjects(memoryInstrumentationClient.countedObjects()); 533 545 534 RefPtr<InspectorMemoryBlocks> children = InspectorMemoryBlocks::create();535 546 MemoryUsageStatsGenerator statsGenerator(&memoryInstrumentationClient); 536 547 statsGenerator.dump(children.get()); -
trunk/Source/WebCore/platform/MemoryUsageSupport.cpp
r132725 r132730 64 64 } 65 65 66 void MemoryUsageSupport:: reportMemoryUsage(MemoryInstrumentation*)66 void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>&) 67 67 { 68 68 } -
trunk/Source/WebCore/platform/MemoryUsageSupport.h
r132725 r132730 62 62 static bool processMemorySizesInBytes(size_t* privateBytes, size_t* sharedBytes); 63 63 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>&); 66 74 }; 67 75 -
trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.cpp
r132725 r132730 36 36 MemoryObjectType PlatformMemoryTypes::Image = "Page.Image"; 37 37 MemoryObjectType PlatformMemoryTypes::Loader = "Page.Loader"; 38 MemoryObjectType PlatformMemoryTypes::GlyphCache = "MemoryCache.GlyphCache";39 38 40 39 } // namespace WebCore -
trunk/Source/WebCore/platform/PlatformMemoryInstrumentation.h
r132725 r132730 44 44 static MemoryObjectType Image; 45 45 static MemoryObjectType Loader; 46 static MemoryObjectType GlyphCache;47 46 }; 48 47 -
trunk/Source/WebCore/platform/chromium/MemoryUsageSupportChromium.cpp
r132725 r132730 32 32 #include "MemoryUsageSupport.h" 33 33 34 #include "PlatformMemoryInstrumentation.h"35 #include <SkGlyphCache.h>36 34 #include <SkGraphics.h> 37 35 #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 }45 36 46 37 namespace WebCore { … … 76 67 } 77 68 78 static bool reportGlyphCache(SkGlyphCache* glyphCache, void* ctx)69 void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>& components) 79 70 { 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)); 88 73 } 89 74 -
trunk/Source/WebCore/platform/qt/MemoryUsageSupportQt.cpp
r132725 r132730 112 112 } 113 113 114 void MemoryUsageSupport:: reportMemoryUsage(MemoryInstrumentation* memoryInstrumentation)114 void MemoryUsageSupport::memoryUsageByComponents(Vector<ComponentInfo>&) 115 115 { 116 116 }
Note:
See TracChangeset
for help on using the changeset viewer.