Title: [147466] trunk
Revision
147466
Author
yu...@chromium.org
Date
2013-04-02 11:16:36 -0700 (Tue, 02 Apr 2013)

Log Message

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

Source/WebCore:

Reviewed by Pavel Feldman.

Native memory snapshot now provides information about JS external strings.

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

* inspector/InspectorMemoryAgent.cpp:

LayoutTests:

Test that native memory snapshot contains information about extenral strings.

Reviewed by Pavel Feldman.

* inspector/profiler/memory-instrumentation-external-string-expected.txt: Added.
* inspector/profiler/memory-instrumentation-external-string.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 (147465 => 147466)


--- trunk/LayoutTests/ChangeLog	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/LayoutTests/ChangeLog	2013-04-02 18:16:36 UTC (rev 147466)
@@ -1,5 +1,22 @@
 2013-04-02  Yury Semikhatsky  <yu...@chromium.org>
 
+        Web Inspector: memory instrumentation for external strings is broken
+        https://bugs.webkit.org/show_bug.cgi?id=113788
+
+        Test that native memory snapshot contains information about extenral strings.
+
+        Reviewed by Pavel Feldman.
+
+        * inspector/profiler/memory-instrumentation-external-string-expected.txt: Added.
+        * inspector/profiler/memory-instrumentation-external-string.html: Added.
+        * platform/efl/TestExpectations:
+        * platform/gtk/TestExpectations:
+        * platform/mac/TestExpectations:
+        * platform/qt/TestExpectations:
+        * platform/win/TestExpectations:
+
+2013-04-02  Yury Semikhatsky  <yu...@chromium.org>
+
         Web Inspector: memory instrumentation for external arrays is broken
         https://bugs.webkit.org/show_bug.cgi?id=113790
 

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


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-string-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-string-expected.txt	2013-04-02 18:16:36 UTC (rev 147466)
@@ -0,0 +1,4 @@
+This test checks that page's external strings size reported by the memory agent includes size of script elements.Bug 113788.
+
+PASS: block size for path = [ProcessPrivateMemory, JSExternalResources] is OK.
+

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


--- trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-string.html	                        (rev 0)
+++ trunk/LayoutTests/inspector/profiler/memory-instrumentation-external-string.html	2013-04-02 18:16:36 UTC (rev 147466)
@@ -0,0 +1,43 @@
+<html>
+<head>
+<script src=""
+<script src=""
+<script>
+function generateLongFunction()
+{
+    var source = [];
+    source.push("function longFunction(x) {");
+    for (var i = 0; i < 100*1000; i++) {
+        source.push("  x += x * i;");
+    }
+    source.push("}");
+    var sourceString = source.join("\n");
+    sourceSize = sourceString.length;
+    var script = document.createElement("script");
+    script.textContent = sourceString;
+    document.head.appendChild(script);
+    return sourceSize;
+}
+
+function test()
+{
+    InspectorTest.evaluateInPage("generateLongFunction()", didGenerateLongScript);
+    function didGenerateLongScript(result) {
+        var externalStringsExpectedMinimum = result.value;
+        if (externalStringsExpectedMinimum < 1024 * 1024) {
+            InspectorTest.addResult("FAIL: script is less than 1Mb: " + externalStringsExpectedMinimum);
+            return InspectorTest.completeTest();
+        }
+        InspectorTest.validateMemoryBlockSize(["ProcessPrivateMemory", "JSExternalResources"], externalStringsExpectedMinimum);
+    }
+}
+</script>
+</head>
+
+<body _onload_="runTest()">
+<p>
+This test checks that page's external strings size reported by the memory agent
+includes size of script elements.<a href="" 113788.</a>
+</p>
+</body>
+</html>

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


--- trunk/LayoutTests/platform/efl/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/LayoutTests/platform/efl/TestExpectations	2013-04-02 18:16:36 UTC (rev 147466)
@@ -1443,6 +1443,8 @@
 
 webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-string.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 (147465 => 147466)


--- trunk/LayoutTests/platform/gtk/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/LayoutTests/platform/gtk/TestExpectations	2013-04-02 18:16:36 UTC (rev 147466)
@@ -946,6 +946,7 @@
 
 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/113787 inspector/profiler/memory-instrumentation-external-string.html [ Skip ]
 
 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-has-uninstrumented-canvases.html [ Failure ]
 webkit.org/b/73936 inspector/profiler/canvas2d/canvas-stack-trace.html [ Failure ]

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


--- trunk/LayoutTests/platform/mac/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/LayoutTests/platform/mac/TestExpectations	2013-04-02 18:16:36 UTC (rev 147466)
@@ -289,6 +289,8 @@
 
 webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-string.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 (147465 => 147466)


--- trunk/LayoutTests/platform/qt/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/LayoutTests/platform/qt/TestExpectations	2013-04-02 18:16:36 UTC (rev 147466)
@@ -274,6 +274,8 @@
 
 webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-string.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 (147465 => 147466)


--- trunk/LayoutTests/platform/win/TestExpectations	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/LayoutTests/platform/win/TestExpectations	2013-04-02 18:16:36 UTC (rev 147466)
@@ -1310,6 +1310,8 @@
 
 webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-array.html [ Skip ]
 
+webkit.org/b/113787 inspector/profiler/memory-instrumentation-external-string.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/WebCore/ChangeLog (147465 => 147466)


--- trunk/Source/WebCore/ChangeLog	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/Source/WebCore/ChangeLog	2013-04-02 18:16:36 UTC (rev 147466)
@@ -1,5 +1,18 @@
 2013-04-02  Yury Semikhatsky  <yu...@chromium.org>
 
+        Web Inspector: memory instrumentation for external strings is broken
+        https://bugs.webkit.org/show_bug.cgi?id=113788
+
+        Reviewed by Pavel Feldman.
+
+        Native memory snapshot now provides information about JS external strings.
+
+        Test: inspector/profiler/memory-instrumentation-external-string.html
+
+        * inspector/InspectorMemoryAgent.cpp:
+
+2013-04-02  Yury Semikhatsky  <yu...@chromium.org>
+
         Web Inspector: memory instrumentation for external arrays is broken
         https://bugs.webkit.org/show_bug.cgi?id=113790
 

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


--- trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2013-04-02 18:14:14 UTC (rev 147465)
+++ trunk/Source/WebCore/inspector/InspectorMemoryAgent.cpp	2013-04-02 18:16:36 UTC (rev 147466)
@@ -160,7 +160,7 @@
 private:
     virtual void visitJSExternalString(StringImpl* string)
     {
-        m_memoryClassInfo->addMember(string, "externalString");
+        m_memoryClassInfo->addMember(string, "externalString", WTF::RetainingPointer);
     }
 
     mutable MemoryClassInfo* m_memoryClassInfo;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to