Title: [134389] trunk
Revision
134389
Author
[email protected]
Date
2012-11-13 02:13:54 -0800 (Tue, 13 Nov 2012)

Log Message

Memory instrumentation: MemoryBlock name should not include full path to the block
https://bugs.webkit.org/show_bug.cgi?id=102055

Reviewed by Pavel Feldman.

Source/WebCore:

* inspector/InspectorMemoryAgent.cpp: pass only last path component as MemoryBlock name
intead of fully qualified name.

LayoutTests:

Use Image instead of Page.Image as block identifier.

* inspector/profiler/memory-instrumentation-cached-images-expected.txt:
* inspector/profiler/memory-instrumentation-cached-images.html:
* inspector/profiler/memory-instrumentation-canvas-expected.txt:
* inspector/profiler/memory-instrumentation-canvas.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (134388 => 134389)


--- trunk/LayoutTests/ChangeLog	2012-11-13 10:11:57 UTC (rev 134388)
+++ trunk/LayoutTests/ChangeLog	2012-11-13 10:13:54 UTC (rev 134389)
@@ -1,3 +1,17 @@
+2012-11-13  Yury Semikhatsky  <[email protected]>
+
+        Memory instrumentation: MemoryBlock name should not include full path to the block
+        https://bugs.webkit.org/show_bug.cgi?id=102055
+
+        Reviewed by Pavel Feldman.
+
+        Use Image instead of Page.Image as block identifier.
+
+        * inspector/profiler/memory-instrumentation-cached-images-expected.txt:
+        * inspector/profiler/memory-instrumentation-cached-images.html:
+        * inspector/profiler/memory-instrumentation-canvas-expected.txt:
+        * inspector/profiler/memory-instrumentation-canvas.html:
+
 2012-11-13  Szilard Ledan  <[email protected]>
 
         [Qt] Unreviewed Qt gardening.

Modified: trunk/LayoutTests/inspector/profiler/memory-instrumentation-cached-images-expected.txt (134388 => 134389)


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-cached-images-expected.txt	2012-11-13 10:11:57 UTC (rev 134388)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-cached-images-expected.txt	2012-11-13 10:13:54 UTC (rev 134389)
@@ -1,5 +1,5 @@
 This test checks that CachedImages size reported by the memory agent includes images decoded size. Bug 93366
 
 
-PASS: block size for path = [ProcessPrivateMemory, Page, Page.Image] is OK.
+PASS: block size for path = [ProcessPrivateMemory, Page, Image] is OK.
 

Modified: trunk/LayoutTests/inspector/profiler/memory-instrumentation-cached-images.html (134388 => 134389)


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-cached-images.html	2012-11-13 10:11:57 UTC (rev 134388)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-cached-images.html	2012-11-13 10:13:54 UTC (rev 134389)
@@ -14,7 +14,7 @@
 function test()
 {
     var jpegDecodedSizeExpected = 20000000;
-    InspectorTest.validateMemoryBlockSize(["ProcessPrivateMemory", "Page", "Page.Image"], jpegDecodedSizeExpected);
+    InspectorTest.validateMemoryBlockSize(["ProcessPrivateMemory", "Page", "Image"], jpegDecodedSizeExpected);
 }
 
 </script>

Modified: trunk/LayoutTests/inspector/profiler/memory-instrumentation-canvas-expected.txt (134388 => 134389)


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-canvas-expected.txt	2012-11-13 10:11:57 UTC (rev 134388)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-canvas-expected.txt	2012-11-13 10:13:54 UTC (rev 134389)
@@ -1,4 +1,4 @@
 This test checks that page's image size reported by the memory agent includes size of canvas internal image buffer.
 
- PASS: block size for path = [ProcessPrivateMemory, Page, Page.Image] is OK.
+ PASS: block size for path = [ProcessPrivateMemory, Page, Image] is OK.
 

Modified: trunk/LayoutTests/inspector/profiler/memory-instrumentation-canvas.html (134388 => 134389)


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-canvas.html	2012-11-13 10:11:57 UTC (rev 134388)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-canvas.html	2012-11-13 10:13:54 UTC (rev 134389)
@@ -17,7 +17,7 @@
 function test()
 {
     var canvasImageBufferExpected = 4000000;
-    InspectorTest.validateMemoryBlockSize(["ProcessPrivateMemory", "Page", "Page.Image"], canvasImageBufferExpected);
+    InspectorTest.validateMemoryBlockSize(["ProcessPrivateMemory", "Page", "Image"], canvasImageBufferExpected);
 }
 
 </script>

Modified: trunk/Source/WebCore/ChangeLog (134388 => 134389)


--- trunk/Source/WebCore/ChangeLog	2012-11-13 10:11:57 UTC (rev 134388)
+++ trunk/Source/WebCore/ChangeLog	2012-11-13 10:13:54 UTC (rev 134389)
@@ -1,3 +1,13 @@
+2012-11-13  Yury Semikhatsky  <[email protected]>
+
+        Memory instrumentation: MemoryBlock name should not include full path to the block
+        https://bugs.webkit.org/show_bug.cgi?id=102055
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/InspectorMemoryAgent.cpp: pass only last path component as MemoryBlock name
+        intead of fully qualified name.
+
 2012-11-13  Pavel Feldman  <[email protected]>
 
         Web Inspector: get rid of enter/exitTextChangeMode in the editor

Modified: trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp (134388 => 134389)


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2012-11-13 10:11:57 UTC (rev 134388)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2012-11-13 10:13:54 UTC (rev 134389)
@@ -118,7 +118,9 @@
     size_t buildObjectForIndex(size_t index, const Vector<String>& objectTypes, InspectorMemoryBlocks* array)
     {
         String typeName = objectTypes[index];
-        RefPtr<InspectorMemoryBlock> block = InspectorMemoryBlock::create().setName(typeName);
+        size_t dotPosition = typeName.reverseFind('.');
+        String blockName = (dotPosition == notFound) ? typeName : typeName.substring(dotPosition + 1);
+        RefPtr<InspectorMemoryBlock> block = InspectorMemoryBlock::create().setName(blockName);
         block->setSize(m_sizesMap.get(typeName));
         String prefix = typeName;
         prefix.append('.');
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to