Title: [147465] trunk
Revision
147465
Author
[email protected]
Date
2013-04-02 11:14:14 -0700 (Tue, 02 Apr 2013)

Log Message

Web Inspector: memory instrumentation for external arrays is broken
https://bugs.webkit.org/show_bug.cgi?id=113790

Source/WebCore:

Report pointers to external arrays as retaining ones to make sure their
size is counted correctly.

Reviewed by Pavel Feldman.

Test: inspector/profiler/memory-instrumentation-external-array.html

* inspector/InspectorMemoryAgent.cpp:

Source/WTF:

Reviewed by Pavel Feldman.

* wtf/MemoryInstrumentationArrayBufferView.h: report buffer pointer as retaining one as
we know that the pointer is not broken.
(WTF::reportMemoryUsage):

LayoutTests:

Test that JS external resources size includes size of JS external arrays
created in the inspected page.

Reviewed by Pavel Feldman.

* inspector/profiler/memory-instrumentation-external-array-expected.txt: Added.
* inspector/profiler/memory-instrumentation-external-array.html: Added.
* platform/efl/TestExpectations:
* platform/gtk/TestExpectations:
* platform/mac/TestExpectations:
* platform/qt/TestExpectations:
* platform/win/TestExpectations:

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (147464 => 147465)


--- trunk/LayoutTests/ChangeLog	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/LayoutTests/ChangeLog	2013-04-02 18:14:14 UTC (rev 147465)
@@ -1,3 +1,21 @@
+2013-04-02  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: memory instrumentation for external arrays is broken
+        https://bugs.webkit.org/show_bug.cgi?id=113790
+
+        Test that JS external resources size includes size of JS external arrays
+        created in the inspected page.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/profiler/memory-instrumentation-external-array-expected.txt: Added.
+        * inspector/profiler/memory-instrumentation-external-array.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/win/TestExpectations:
+
 2013-04-02  Bem Jones-Bey  <[email protected]>
 
         [css exclusions] overflow:hidden undoes shape-outside offsets

Added: trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-array-expected.txt (0 => 147465)


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-array-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-array-expected.txt	2013-04-02 18:14:14 UTC (rev 147465)
@@ -0,0 +1,4 @@
+This test checks that page's external arrays size reported by the memory agent includes size of all external arrays created by the page. Bug 113790.
+
+PASS: block size for path = [ProcessPrivateMemory, JSExternalResources] is OK.
+

Added: trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-array.html (0 => 147465)


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-array.html	                        (rev 0)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-array.html	2013-04-02 18:14:14 UTC (rev 147465)
@@ -0,0 +1,24 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+
+var bigExternalArray = new Int32Array(1024 * 1024);
+
+function test()
+{
+    var externalArraysExpectedMinimum = 4 * 1024 * 1024;
+    InspectorTest.validateMemoryBlockSize(["ProcessPrivateMemory", "JSExternalResources"], externalArraysExpectedMinimum);
+}
+</script>
+</head>
+
+<body _onload_="runTest()">
+<p>
+This test checks that page's external arrays size reported by the memory agent
+includes size of all external arrays created by the page.
+<a href="" 113790.</a>
+</p>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/efl/TestExpectations (147464 => 147465)


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
@@ -1441,6 +1441,8 @@
 webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-sorting-instances.html [ Skip ]
 webkit.org/b/50485 inspector-protocol/heap-profiler [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
+
 # ENABLE(INPUT_MULTIPLE_FIELDS_UI) is disabled
 fast/forms/date-multiple-fields
 fast/forms/datetime-multiple-fields

Modified: trunk/LayoutTests/platform/gtk/TestExpectations (147464 => 147465)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
@@ -944,6 +944,7 @@
 webkit.org/b/50485 inspector/profiler/heap-snapshot-summary-sorting-instances.html [ Failure ]
 webkit.org/b/50485 inspector-protocol/heap-profiler [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
 webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html [ Failure ]
 
 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-has-uninstrumented-canvases.html [ Failure ]

Modified: trunk/LayoutTests/platform/mac/TestExpectations (147464 => 147465)


--- trunk/LayoutTests/platform/mac/TestExpectations	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
@@ -287,6 +287,8 @@
 inspector/profiler/heap-snapshot-summary-sorting-instances.html
 webkit.org/b/50485 inspector-protocol/heap-profiler [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
+
 # New inspector/profiler/memory-instrumentation-canvas.html fails on JSC platforms
 webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html
 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-has-uninstrumented-canvases.html

Modified: trunk/LayoutTests/platform/qt/TestExpectations (147464 => 147465)


--- trunk/LayoutTests/platform/qt/TestExpectations	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
@@ -272,6 +272,8 @@
 inspector/profiler/memory-instrumentation-cached-images.html
 webkit.org/b/50485 inspector-protocol/heap-profiler [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
+
 # https://bugs.webkit.org/show_bug.cgi?id=40300
 inspector/debugger/live-edit.html
 inspector/debugger/live-edit-breakpoints.html

Modified: trunk/LayoutTests/platform/win/TestExpectations (147464 => 147465)


--- trunk/LayoutTests/platform/win/TestExpectations	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/LayoutTests/platform/win/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
@@ -1308,6 +1308,8 @@
 inspector/profiler/heap-snapshot-summary-sorting-instances.html
 webkit.org/b/50485 inspector-protocol/heap-profiler [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
+
 # New inspector/profiler/memory-instrumentation-canvas.html fails on JSC platforms
 webkit.org/b/99001 inspector/profiler/memory-instrumentation-canvas.html
 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-has-uninstrumented-canvases.html

Modified: trunk/Source/WTF/ChangeLog (147464 => 147465)


--- trunk/Source/WTF/ChangeLog	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/Source/WTF/ChangeLog	2013-04-02 18:14:14 UTC (rev 147465)
@@ -1,3 +1,14 @@
+2013-04-02  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: memory instrumentation for external arrays is broken
+        https://bugs.webkit.org/show_bug.cgi?id=113790
+
+        Reviewed by Pavel Feldman.
+
+        * wtf/MemoryInstrumentationArrayBufferView.h: report buffer pointer as retaining one as
+        we know that the pointer is not broken.
+        (WTF::reportMemoryUsage):
+
 2013-04-01  Han Shen  <[email protected]>
 
         Move definition of nested classes that inherit enclosing class outside class definition.

Modified: trunk/Source/WTF/wtf/MemoryInstrumentationArrayBufferView.h (147464 => 147465)


--- trunk/Source/WTF/wtf/MemoryInstrumentationArrayBufferView.h	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/Source/WTF/wtf/MemoryInstrumentationArrayBufferView.h	2013-04-02 18:14:14 UTC (rev 147465)
@@ -39,7 +39,7 @@
 inline void reportMemoryUsage(const ArrayBufferView* arrayBufferView, MemoryObjectInfo* memoryObjectInfo)
 {
     MemoryClassInfo info(memoryObjectInfo, arrayBufferView);
-    info.addMember(arrayBufferView->buffer().get(), "buffer");
+    info.addMember(arrayBufferView->buffer().get(), "buffer", RetainingPointer);
 }
 
 inline void reportMemoryUsage(const ArrayBuffer* arrayBuffer, MemoryObjectInfo* memoryObjectInfo)

Modified: trunk/Source/WebCore/ChangeLog (147464 => 147465)


--- trunk/Source/WebCore/ChangeLog	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/Source/WebCore/ChangeLog	2013-04-02 18:14:14 UTC (rev 147465)
@@ -1,3 +1,17 @@
+2013-04-02  Yury Semikhatsky  <[email protected]>
+
+        Web Inspector: memory instrumentation for external arrays is broken
+        https://bugs.webkit.org/show_bug.cgi?id=113790
+
+        Report pointers to external arrays as retaining ones to make sure their
+        size is counted correctly.
+
+        Reviewed by Pavel Feldman.
+
+        Test: inspector/profiler/memory-instrumentation-external-array.html
+
+        * inspector/InspectorMemoryAgent.cpp:
+
 2013-04-02  Peter Beverloo  <[email protected]>
 
         [JSC] Don't create a JSValue if it's not going to be used for nullable attributes

Modified: trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp (147464 => 147465)


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2013-04-02 18:12:30 UTC (rev 147464)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2013-04-02 18:14:14 UTC (rev 147465)
@@ -182,7 +182,7 @@
 private:
     virtual void visitJSExternalArray(ArrayBufferView* arrayBufferView)
     {
-        m_memoryClassInfo->addMember(arrayBufferView, "externalArray");
+        m_memoryClassInfo->addMember(arrayBufferView, "externalArray", WTF::RetainingPointer);
     }
 
     mutable MemoryClassInfo* m_memoryClassInfo;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to