Changeset 120589 in webkit
- Timestamp:
- Jun 18, 2012 4:40:47 AM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r120588 r120589 1 2012-06-18 Alexei Filippov <alexeif@chromium.org> 2 3 Web Inspector: Add heap profiler owned memory to the pie chart 4 https://bugs.webkit.org/show_bug.cgi?id=89203 5 6 Heap profiler may consume considerable amount of memory 7 which is currently falls into Unknown category. 8 Give it a separate sector on the pie chart. 9 10 Reviewed by Yury Semikhatsky. 11 12 * bindings/js/ScriptProfiler.h: 13 (WebCore::ScriptProfiler::profilerSnapshotsSize): 14 * bindings/v8/ScriptProfiler.cpp: 15 (WebCore::ScriptProfiler::profilerSnapshotsSize): 16 (WebCore): 17 * bindings/v8/ScriptProfiler.h: 18 (ScriptProfiler): 19 * inspector/InspectorMemoryAgent.cpp: 20 (MemoryBlockName): 21 (WebCore): 22 (WebCore::inspectorData): 23 (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution): 24 * inspector/front-end/NativeMemorySnapshotView.js: 25 (WebInspector.MemoryBlockViewProperties._initialize): 26 1 27 2012-06-18 Mario Sanchez Prada <msanchez@igalia.com> 2 28 -
trunk/Source/WebCore/bindings/js/ScriptProfiler.h
r116768 r120589 75 75 static void visitJSDOMWrappers(DOMWrapperVisitor*) { } 76 76 static void visitExternalJSStrings(DOMWrapperVisitor*) { } 77 static size_t profilerSnapshotsSize() { return 0; } 77 78 }; 78 79 -
trunk/Source/WebCore/bindings/v8/ScriptProfiler.cpp
r116768 r120589 197 197 } 198 198 199 size_t ScriptProfiler::profilerSnapshotsSize() 200 { 201 return v8::HeapProfiler::GetMemorySizeUsedByProfiler(); 202 } 203 199 204 } // namespace WebCore 200 205 -
trunk/Source/WebCore/bindings/v8/ScriptProfiler.h
r116768 r120589 79 79 static void visitJSDOMWrappers(DOMWrapperVisitor*); 80 80 static void visitExternalJSStrings(DOMWrapperVisitor*); 81 static size_t profilerSnapshotsSize(); 81 82 }; 82 83 -
trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp
r120044 r120589 67 67 static const char jsHeapAllocated[] = "JSHeapAllocated"; 68 68 static const char jsHeapUsed[] = "JSHeapUsed"; 69 static const char inspectorData[] = "InspectorData"; 69 70 static const char memoryCache[] = "MemoryCache"; 70 71 static const char processPrivateMemory[] = "ProcessPrivateMemory"; … … 348 349 } 349 350 351 static PassRefPtr<InspectorMemoryBlock> inspectorData() 352 { 353 size_t dataSize = ScriptProfiler::profilerSnapshotsSize(); 354 RefPtr<InspectorMemoryBlock> inspectorData = InspectorMemoryBlock::create().setName(MemoryBlockName::inspectorData); 355 inspectorData->setSize(static_cast<int>(dataSize)); 356 return inspectorData.release(); 357 } 358 350 359 static PassRefPtr<InspectorMemoryBlock> renderTreeInfo(Page* page) 351 360 { … … 402 411 RefPtr<TypeBuilder::Array<InspectorMemoryBlock> > children = TypeBuilder::Array<InspectorMemoryBlock>::create(); 403 412 children->addItem(jsHeapInfo()); 413 children->addItem(inspectorData()); 404 414 children->addItem(memoryCacheInfo()); 405 415 children->addItem(renderTreeInfo(m_page)); // TODO: collect for all pages? -
trunk/Source/WebCore/inspector/front-end/NativeMemorySnapshotView.js
r120579 r120589 215 215 WebInspector.MemoryBlockViewProperties._standardBlocks[name] = new WebInspector.MemoryBlockViewProperties(fillStyle, name, WebInspector.UIString(description)); 216 216 } 217 addBlock("rgba(255, 255, 255, 0.8)", "ProcessPrivateMemory", "Total"); 218 addBlock("rgba(240, 240, 250, 0.8)", "Other", "Other"); 219 addBlock("rgba(250, 200, 200, 0.8)", "JSHeapAllocated", "JavaScript heap"); 220 addBlock("rgba(200, 250, 200, 0.8)", "JSHeapUsed", "Used JavaScript heap"); 221 addBlock("rgba(200, 170, 200, 0.8)", "MemoryCache", "Memory cache resources"); 222 addBlock("rgba(250, 250, 150, 0.8)", "RenderTreeAllocated", "Render tree"); 223 addBlock("rgba(200, 150, 150, 0.8)", "RenderTreeUsed", "Render tree used"); 217 addBlock("hsl( 0, 0%, 100%)", "ProcessPrivateMemory", "Total"); 218 addBlock("hsl( 0, 0%, 80%)", "Other", "Other"); 219 addBlock("hsl( 90, 60%, 80%)", "JSHeapAllocated", "JavaScript heap"); 220 addBlock("hsl( 90, 80%, 80%)", "JSHeapUsed", "Used JavaScript heap"); 221 addBlock("hsl(210, 60%, 80%)", "InspectorData", "Inspector data"); 222 addBlock("hsl( 30, 60%, 80%)", "MemoryCache", "Memory cache resources"); 223 addBlock("hsl( 60, 60%, 80%)", "RenderTreeAllocated", "Render tree"); 224 addBlock("hsl( 60, 60%, 80%)", "RenderTreeUsed", "Render tree used"); 224 225 } 225 226
Note: See TracChangeset
for help on using the changeset viewer.