Web Inspector: Properly display native memory sizes bigger than 2GB
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 04:07:42 +0000 (04:07 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 04:07:42 +0000 (04:07 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89661

Patch by Alexei Filippov <alexeif@chromium.org> on 2012-06-21
Reviewed by Pavel Feldman.

* inspector/Inspector.json:
* inspector/InspectorMemoryAgent.cpp:
(WebCore::jsHeapInfo):
(WebCore::inspectorData):
(WebCore::renderTreeInfo):
(WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121002 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/inspector/Inspector.json
Source/WebCore/inspector/InspectorMemoryAgent.cpp

index a75e848..0e522fd 100644 (file)
@@ -1,3 +1,17 @@
+2012-06-21  Alexei Filippov  <alexeif@chromium.org>
+
+        Web Inspector: Properly display native memory sizes bigger than 2GB
+        https://bugs.webkit.org/show_bug.cgi?id=89661
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/Inspector.json:
+        * inspector/InspectorMemoryAgent.cpp:
+        (WebCore::jsHeapInfo):
+        (WebCore::inspectorData):
+        (WebCore::renderTreeInfo):
+        (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
+
 2012-06-21  Abhishek Arya  <inferno@chromium.org>
 
         Crash in RenderBlock::layoutPositionedObjects.
index 42d3be0..403d378 100644 (file)
@@ -92,7 +92,7 @@
                 "id": "MemoryBlock",
                 "type": "object",
                 "properties": [
-                    { "name": "size", "type": "integer", "optional": true, "description": "Size of the block in bytes if available" },
+                    { "name": "size", "type": "number", "optional": true, "description": "Size of the block in bytes if available" },
                     { "name": "name", "type": "string", "description": "Unique name used to identify the component that allocated this block" },
                     { "name": "children", "type": "array", "optional": true, "items": { "$ref": "MemoryBlock" }}
                 ]
index 752f728..0fb2aac 100644 (file)
@@ -337,11 +337,11 @@ static PassRefPtr<InspectorMemoryBlock> jsHeapInfo()
     ScriptGCEvent::getHeapSize(usedJSHeapSize, totalJSHeapSize, jsHeapSizeLimit);
 
     RefPtr<InspectorMemoryBlock> jsHeapAllocated = InspectorMemoryBlock::create().setName(MemoryBlockName::jsHeapAllocated);
-    jsHeapAllocated->setSize(static_cast<int>(totalJSHeapSize));
+    jsHeapAllocated->setSize(totalJSHeapSize);
 
     RefPtr<TypeBuilder::Array<InspectorMemoryBlock> > children = TypeBuilder::Array<InspectorMemoryBlock>::create();
     RefPtr<InspectorMemoryBlock> jsHeapUsed = InspectorMemoryBlock::create().setName(MemoryBlockName::jsHeapUsed);
-    jsHeapUsed->setSize(static_cast<int>(usedJSHeapSize));
+    jsHeapUsed->setSize(usedJSHeapSize);
     children->addItem(jsHeapUsed);
 
     jsHeapAllocated->setChildren(children);
@@ -352,7 +352,7 @@ static PassRefPtr<InspectorMemoryBlock> inspectorData()
 {
     size_t dataSize = ScriptProfiler::profilerSnapshotsSize();
     RefPtr<InspectorMemoryBlock> inspectorData = InspectorMemoryBlock::create().setName(MemoryBlockName::inspectorData);
-    inspectorData->setSize(static_cast<int>(dataSize));
+    inspectorData->setSize(dataSize);
     return inspectorData.release();
 }
 
@@ -361,11 +361,11 @@ static PassRefPtr<InspectorMemoryBlock> renderTreeInfo(Page* page)
     ArenaSize arenaSize = page->renderTreeSize();
 
     RefPtr<InspectorMemoryBlock> renderTreeAllocated = InspectorMemoryBlock::create().setName(MemoryBlockName::renderTreeAllocated);
-    renderTreeAllocated->setSize(static_cast<int>(arenaSize.allocated));
+    renderTreeAllocated->setSize(arenaSize.allocated);
 
     RefPtr<TypeBuilder::Array<InspectorMemoryBlock> > children = TypeBuilder::Array<InspectorMemoryBlock>::create();
     RefPtr<InspectorMemoryBlock> renderTreeUsed = InspectorMemoryBlock::create().setName(MemoryBlockName::renderTreeUsed);
-    renderTreeUsed->setSize(static_cast<int>(arenaSize.treeSize));
+    renderTreeUsed->setSize(arenaSize.treeSize);
     children->addItem(renderTreeUsed);
 
     renderTreeAllocated->setChildren(children);
@@ -406,7 +406,7 @@ void InspectorMemoryAgent::getProcessMemoryDistribution(ErrorString*, RefPtr<Ins
     size_t sharedBytes = 0;
     MemoryUsageSupport::processMemorySizesInBytes(&privateBytes, &sharedBytes);
     processMemory = InspectorMemoryBlock::create().setName(MemoryBlockName::processPrivateMemory);
-    processMemory->setSize(static_cast<int>(privateBytes));
+    processMemory->setSize(privateBytes);
 
     RefPtr<TypeBuilder::Array<InspectorMemoryBlock> > children = TypeBuilder::Array<InspectorMemoryBlock>::create();
     children->addItem(jsHeapInfo());