+2016-05-20 Joseph Pecoraro <pecoraro@apple.com>
+
+ Remove LegacyProfiler
+ https://bugs.webkit.org/show_bug.cgi?id=153565
+
+ Reviewed by Saam Barati.
+
+ * ManualTests/inspector/profiler-test-call.html: Removed.
+ * ManualTests/inspector/profiler-test-many-calls-in-the-same-scope.html: Removed.
+
2016-05-18 Gwang Yoon Hwang <yoon@igalia.com>
[GStreamer] Use FakeSink to get a decoded texture from a pipeline
+2016-05-20 Joseph Pecoraro <pecoraro@apple.com>
+
+ Remove LegacyProfiler
+ https://bugs.webkit.org/show_bug.cgi?id=153565
+
+ Reviewed by Saam Barati.
+
+ * fast/profiler/anonymous-event-handler-expected.txt: Removed.
+ * fast/profiler/anonymous-event-handler.html: Removed.
+ * fast/profiler/anonymous-function-called-from-different-contexts-expected.txt: Removed.
+ * fast/profiler/anonymous-function-called-from-different-contexts.html: Removed.
+ * fast/profiler/anonymous-function-calls-built-in-functions-expected.txt: Removed.
+ * fast/profiler/anonymous-function-calls-built-in-functions.html: Removed.
+ * fast/profiler/anonymous-function-calls-eval-expected.txt: Removed.
+ * fast/profiler/anonymous-function-calls-eval.html: Removed.
+ * fast/profiler/anonymous-functions-with-display-names-expected.txt: Removed.
+ * fast/profiler/anonymous-functions-with-display-names.html: Removed.
+ * fast/profiler/apply-expected.txt: Removed.
+ * fast/profiler/apply.html: Removed.
+ * fast/profiler/built-in-function-calls-anonymous-expected.txt: Removed.
+ * fast/profiler/built-in-function-calls-anonymous.html: Removed.
+ * fast/profiler/built-in-function-calls-user-defined-function-expected.txt: Removed.
+ * fast/profiler/built-in-function-calls-user-defined-function.html: Removed.
+ * fast/profiler/call-expected.txt: Removed.
+ * fast/profiler/call-register-leak-expected.txt: Removed.
+ * fast/profiler/call-register-leak.html: Removed.
+ * fast/profiler/call.html: Removed.
+ * fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope-expected.txt: Removed.
+ * fast/profiler/calling-the-function-that-started-the-profiler-from-another-scope.html: Removed.
+ * fast/profiler/compare-multiple-profiles-expected.txt: Removed.
+ * fast/profiler/compare-multiple-profiles.html: Removed.
+ * fast/profiler/constructor-expected.txt: Removed.
+ * fast/profiler/constructor.html: Removed.
+ * fast/profiler/dead-time-expected.txt: Removed.
+ * fast/profiler/dead-time.html: Removed.
+ * fast/profiler/document-dot-write-expected.txt: Removed.
+ * fast/profiler/document-dot-write.html: Removed.
+ * fast/profiler/event-handler-expected.txt: Removed.
+ * fast/profiler/event-handler.html: Removed.
+ * fast/profiler/execution-context-and-eval-on-same-line-expected.txt: Removed.
+ * fast/profiler/execution-context-and-eval-on-same-line.html: Removed.
+ * fast/profiler/inline-event-handler-expected.txt: Removed.
+ * fast/profiler/inline-event-handler.html: Removed.
+ * fast/profiler/many-calls-in-the-same-scope-expected.txt: Removed.
+ * fast/profiler/many-calls-in-the-same-scope.html: Removed.
+ * fast/profiler/multiple-and-different-scoped-anonymous-function-calls-expected.txt: Removed.
+ * fast/profiler/multiple-and-different-scoped-anonymous-function-calls.html: Removed.
+ * fast/profiler/multiple-and-different-scoped-function-calls-expected.txt: Removed.
+ * fast/profiler/multiple-and-different-scoped-function-calls.html: Removed.
+ * fast/profiler/multiple-anonymous-functions-called-from-the-same-function-expected.txt: Removed.
+ * fast/profiler/multiple-anonymous-functions-called-from-the-same-function.html: Removed.
+ * fast/profiler/multiple-frames-expected.txt: Removed.
+ * fast/profiler/multiple-frames.html: Removed.
+ * fast/profiler/named-functions-with-display-names-expected.txt: Removed.
+ * fast/profiler/named-functions-with-display-names.html: Removed.
+ * fast/profiler/nested-anonymous-functon-expected.txt: Removed.
+ * fast/profiler/nested-anonymous-functon.html: Removed.
+ * fast/profiler/nested-start-and-stop-profiler-expected.txt: Removed.
+ * fast/profiler/nested-start-and-stop-profiler.html: Removed.
+ * fast/profiler/no-execution-context-expected.txt: Removed.
+ * fast/profiler/no-execution-context.html: Removed.
+ * fast/profiler/one-execution-context-expected.txt: Removed.
+ * fast/profiler/one-execution-context.html: Removed.
+ * fast/profiler/profile-calls-in-included-file-expected.txt: Removed.
+ * fast/profiler/profile-calls-in-included-file.html: Removed.
+ * fast/profiler/profile-with-no-title-expected.txt: Removed.
+ * fast/profiler/profile-with-no-title.html: Removed.
+ * fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting-expected.txt: Removed.
+ * fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html: Removed.
+ * fast/profiler/profiling-from-a-nested-location-expected.txt: Removed.
+ * fast/profiler/profiling-from-a-nested-location.html: Removed.
+ * fast/profiler/resources/other-frame.html: Removed.
+ * fast/profiler/resources/other-window.html: Removed.
+ * fast/profiler/resources/profiler-test-JS-resources.js: Removed.
+ * fast/profiler/simple-event-call-expected.txt: Removed.
+ * fast/profiler/simple-event-call.html: Removed.
+ * fast/profiler/simple-no-level-change-expected.txt: Removed.
+ * fast/profiler/simple-no-level-change.html: Removed.
+ * fast/profiler/start-and-stop-profiler-multiple-times-expected.txt: Removed.
+ * fast/profiler/start-and-stop-profiler-multiple-times.html: Removed.
+ * fast/profiler/start-and-stop-profiling-in-the-same-function-expected.txt: Removed.
+ * fast/profiler/start-and-stop-profiling-in-the-same-function.html: Removed.
+ * fast/profiler/start-but-dont-stop-profiling-expected.txt: Removed.
+ * fast/profiler/start-but-dont-stop-profiling.html: Removed.
+ * fast/profiler/stop-profiling-after-setTimeout-expected.txt: Removed.
+ * fast/profiler/stop-profiling-after-setTimeout.html: Removed.
+ * fast/profiler/stop-then-function-call-expected.txt: Removed.
+ * fast/profiler/stop-then-function-call.html: Removed.
+ * fast/profiler/throw-exception-from-eval-expected.txt: Removed.
+ * fast/profiler/throw-exception-from-eval.html-disabled: Removed.
+ * fast/profiler/two-execution-contexts-expected.txt: Removed.
+ * fast/profiler/two-execution-contexts.html: Removed.
+ * fast/profiler/user-defined-function-calls-built-in-functions-expected.txt: Removed.
+ * fast/profiler/user-defined-function-calls-built-in-functions.html: Removed.
+ * fast/profiler/window-dot-eval-expected.txt: Removed.
+ * fast/profiler/window-dot-eval.html: Removed.
+ * platform/efl/TestExpectations:
+ * platform/gtk/TestExpectations:
+ * platform/ios-simulator/TestExpectations:
+
2016-05-20 Zalan Bujtas <zalan@apple.com>
`width: 1%` on nested table cell causes its table to hog horizontal space
+++ /dev/null
-This page has an anonymous event handler.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. It should show the anonymous function at the same level as the onload handler.
-
-Profile title: Anonymous event handler
-Thread_1 (no file) (line 0:0)
- startTest anonymous-event-handler.html (line 10:19)
- getElementById (no file) (line 0:0)
- click (no file) (line 0:0)
- onclick anonymous-event-handler.html (line 15:51)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Anonymous event handler");
-
- var buttonWithAnonymousHandler = document.getElementById("buttonWithAnAnonymousEventHandler")
- buttonWithAnonymousHandler.onclick = function () {
- insertNewText();
- }
-
- buttonWithAnonymousHandler.click();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has an anonymous event handler.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. It should show the anonymous function at the same level as the onload
-handler.
-<input type="button" id="buttonWithAnAnonymousEventHandler" value="Button with an anonymous event handler">
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls an anonymous function from different contexts.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. Beneath onload and startTest it should show three children, an anonymous function, script context, and the endTest call.
-
-Profile title: Same anonymous function called from different contexts
-Thread_1 (no file) (line 0:0)
- startTest anonymous-function-called-from-different-contexts.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- eval (no file) (line 0:0)
- (program) (no file) (line 1:1)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Same anonymous function called from different contexts");
-
- anonymousFunction();
- eval("anonymousFunction()");
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls an anonymous function from different contexts.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. Beneath onload and startTest it should show three children, an
-anonymous function, script context, and the endTest call.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has an anonymous JavaScript function that calls built-in functions.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. Beneath onload and startTest it should show three children, an anonymous function, script context, and the endTest call.
-
-Profile title: Anonymous function calls built-in functions
-Thread_1 (no file) (line 0:0)
- startTest anonymous-function-calls-built-in-functions.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Anonymous function calls built-in functions");
- anonymousFunction();
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has an anonymous JavaScript function that calls built-in functions.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. Beneath onload and startTest it should show three children, an
-anonymous function, script context, and the endTest call.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls an anonymous function which calls eval().
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. Beneath onload and startTest it should show an (anonymous function) which has a (program) child.
-
-Profile title: Anonymous function calles eval
-Thread_1 (no file) (line 0:0)
- startTest anonymous-function-calls-eval.html (line 10:19)
- variableThatPointsToAnAnonymousFunction anonymous-function-calls-eval.html (line 14:59)
- eval (no file) (line 0:0)
- (program) (no file) (line 1:1)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Anonymous function calles eval");
-
- var variableThatPointsToAnAnonymousFunction = function() {
- eval("insertNewText()");
- }
-
- variableThatPointsToAnAnonymousFunction();
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls an anonymous function which calls eval().
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. Beneath onload and startTest it should show an (anonymous function)
-which has a (program) child.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls anonymous functions with display names.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. You should see functions named "[x] iterations function", and no anonymous functions.
-
-Profile title: Anonymous functions with display names
-Thread_1 (no file) (line 0:0)
- startTest anonymous-functions-with-display-names.html (line 22:19)
- anonymousFunctionGenerator anonymous-functions-with-display-names.html (line 10:36)
- 0 iterations function anonymous-functions-with-display-names.html (line 12:59)
- 1 iterations function anonymous-functions-with-display-names.html (line 12:59)
- 2 iterations function anonymous-functions-with-display-names.html (line 12:59)
- 20 iterations function anonymous-functions-with-display-names.html (line 12:59)
- 1000 iterations function anonymous-functions-with-display-names.html (line 12:59)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function anonymousFunctionGenerator(iterations)
-{
- var variableThatPointsToAnAnonymousFunction = function()
- {
- for (var i = 0; i < iterations; ++i) ;
- }
-
- variableThatPointsToAnAnonymousFunction.displayName = iterations + " iterations function";
-
- return variableThatPointsToAnAnonymousFunction;
-}
-
-function startTest()
-{
- console.profile("Anonymous functions with display names");
-
- anonymousFunctionGenerator(0)();
- anonymousFunctionGenerator(1)();
- anonymousFunctionGenerator(2)();
- anonymousFunctionGenerator(20)();
- anonymousFunctionGenerator(1000)();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls anonymous functions with display names.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. You should see functions named "[x] iterations function", and no anonymous functions.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript has a call to apply() in it.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to fakeInteriorFunction() and a call to apply().
-
-Profile title: Using the apply() method
-Thread_1 (no file) (line 0:0)
- startTest apply.html (line 10:19)
- fakeObject apply.html (line 17:21)
- fakeInteriorFunction apply.html (line 23:30)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Using the apply() method");
- var myObject = new fakeObject(1, 2);
- endTest();
-}
-
-function fakeObject (x, y)
-{
- this.x = x;
- fakeInteriorFunction.apply(this, arguments);
-}
-
-function fakeInteriorFunction(x, y)
-{
- this.y = y;
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript has a call to apply() in it.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to fakeInteriorFunction() and
-a call to apply().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page uses a built-in function to call an anonymous function.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile map() should be the sibling of an (anonymous function) which has arrayOperatorFunction() as a child.
-
-Profile title: Built-in function calls an anonymous function
-Thread_1 (no file) (line 0:0)
- startTest built-in-function-calls-anonymous.html (line 10:19)
- Array (no file) (line 0:0)
- map (no file) (line 0:0)
- Object (no file) (line 0:0)
- toLength (no file) (line 0:0)
- toInteger (no file) (line 0:0)
- Number (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- isArray (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- speciesGetter (no file) (line 0:0)
- Array (no file) (line 0:0)
- myFunction built-in-function-calls-anonymous.html (line 14:30)
- arrayOperatorFunction profiler-test-JS-resources.js (line 25:31)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Built-in function calls an anonymous function");
-
- var myFunction = function(arrayElement) {
- return arrayOperatorFunction(arrayElement);
- }
-
- var myArray = new Array (0, 1, 2);
- myArray.map(myFunction);
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page uses a built-in function to call an anonymous function.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile map() should be the sibling of an (anonymous function)
-which has arrayOperatorFunction() as a child.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page uses a built-in function to call a user defined function.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile map() should have arrayOperatorFunction() as a child.
-
-Profile title: Built-in function calls a user defined function
-Thread_1 (no file) (line 0:0)
- startTest built-in-function-calls-user-defined-function.html (line 10:19)
- Array (no file) (line 0:0)
- map (no file) (line 0:0)
- Object (no file) (line 0:0)
- toLength (no file) (line 0:0)
- toInteger (no file) (line 0:0)
- Number (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- isArray (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- speciesGetter (no file) (line 0:0)
- Array (no file) (line 0:0)
- arrayOperatorFunction profiler-test-JS-resources.js (line 25:31)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Built-in function calls a user defined function");
-
- var myArray = new Array (0, 1, 2);
- myArray.map(arrayOperatorFunction);
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page uses a built-in function to call a user defined function.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile map() should have arrayOperatorFunction() as a child.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript has a call to call() in it.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to fakeObject() with call() as its child and a fakeInteriorFunction() as call()'s child.
-
-Profile title: Using the call() method
-Thread_1 (no file) (line 0:0)
- startTest call.html (line 10:19)
- fakeObject call.html (line 19:21)
- fakeInteriorFunction call.html (line 25:30)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-This page tests that the generation of bytecode allocates registers correctly when profiling is enabled. To run the test manually, enable profiling in the web inspector and reload this page.
-
-PASS: localCallTest(1, 2) should be 2 and is.
-
-PASS: globalCallTest(1, 2) should be 2 and is.
-
-PASS: scopedCallTest(1, 2) should be 2 and is.
-
-PASS: resolveCallTest(1, 2) should be 2 and is.
-
-PASS: bracketCallTest(1, 2) should be 2 and is.
-
-PASS: dotCallTest(1, 2) should be 2 and is.
-
-PASS: newTest(1, 2) should be 2 and is.
-
-
+++ /dev/null
-<body>
-<head>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function log(s)
-{
- if (this.document)
- document.getElementById("console").appendChild(document.createTextNode(s + "\n"));
- else
- print(s + "\n");
-}
-
-function shouldBe(a, aDescription, b)
-{
- if (a === b)
- log("PASS: " + aDescription + " should be " + b + " and is.\n");
- else
- log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + ".\n");
-}
-
-function localCallTest(a, b)
-{
- function localCall(o)
- {
- return o.toString();
- }
- return [localCall(a), b][1];
-}
-
-function globalCall(o)
-{
- return o.toString();
-}
-
-function globalCallTest(a, b)
-{
- return [globalCall(a), b][1];
-}
-
-function scopedCallTest(a, b)
-{
- function scopedCall(o)
- {
- return o.toString();
- }
-
- function f()
- {
- return [scopedCall(a), b][1];
- }
-
- return f();
-}
-
-function resolveCallTest(a, b)
-{
- o = { resolvedCall: function(o) { return o.toString(); }};
- with (o) {
- return [resolvedCall(o), b][1];
- }
-}
-
-function bracketCallTest(a, b)
-{
- return [a["toString"](), b][1];
-}
-
-function dotCallTest(a, b)
-{
- return [a.toString(), b][1];
-}
-
-function testConstructor(o)
-{
- return o.toString();
-}
-
-function newTest(a, b)
-{
- return [new testConstructor(a), b][1];
-}
-
-function startTest()
-{
- shouldBe(localCallTest(1, 2), "localCallTest(1, 2)", 2);
- shouldBe(globalCallTest(1, 2), "globalCallTest(1, 2)", 2);
- shouldBe(scopedCallTest(1, 2), "scopedCallTest(1, 2)", 2);
- shouldBe(resolveCallTest(1, 2), "resolveCallTest(1, 2)", 2);
- shouldBe(bracketCallTest(1, 2), "bracketCallTest(1, 2)", 2);
- shouldBe(dotCallTest(1, 2), "dotCallTest(1, 2)", 2);
- shouldBe(newTest(1, 2), "newTest(1, 2)", 2);
-}
-</script>
-</head>
-<body onload="startTest()">
-<p>
-This page tests that the generation of bytecode allocates registers correctly when profiling is enabled. To run the test manually, enable profiling in the web inspector and reload this page.
-</p>
-<pre id="console"></pre>
-</body>
-</html>
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Using the call() method");
-
- var myObject = new fakeObject(1, 2);
-
- endTest();
-}
-
-function fakeObject (x, y)
-{
- this.x = x;
- fakeInteriorFunction.call(this, y);
-}
-
-function fakeInteriorFunction(y)
-{
- this.y = y;
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript has a call to call() in it.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to fakeObject() with call() as
-its child and a fakeInteriorFunction() as call()'s child.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript starts profiling from within a function which is then called later from another context.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profiler you should see a call to indirection() and functionWichStartsAndStopsTheProfiler()
-
-Profile title: Calling the same function where the profile started from another function
-Thread_1 (no file) (line 0:0)
- indirection calling-the-function-that-started-the-profiler-from-another-scope.html (line 17:21)
- functionWichStartsAndStopsTheProfiler calling-the-function-that-started-the-profiler-from-another-scope.html (line 23:47)
- functionWichStartsAndStopsTheProfiler calling-the-function-that-started-the-profiler-from-another-scope.html (line 23:47)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- indirection();
- functionWichStartsAndStopsTheProfiler();
- endTest();
-}
-
-function indirection()
-{
- functionWichStartsAndStopsTheProfiler();
-}
-
-var firstTime = true;
-function functionWichStartsAndStopsTheProfiler()
-{
- if (firstTime) {
- console.profile("Calling the same function where the profile started from another function");
- firstTime = false;
- }
-
- for (var i = 0; i < 10000000; i++)
- var b = i + 2;
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript starts profiling from within a function which is then called
-later from another context.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profiler you should see a call to indirection() and
-functionWichStartsAndStopsTheProfiler()
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has multiple profiles with the same name.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. It should not crash or hang and there should be multiple runs of the same named profile.
-
-Profile title: Test
-Thread_1 (no file) (line 0:0)
- startTest compare-multiple-profiles.html (line 22:19)
- test compare-multiple-profiles.html (line 11:14)
- test2 compare-multiple-profiles.html (line 17:15)
-
-Profile title: Test
-Thread_1 (no file) (line 0:0)
- startTest compare-multiple-profiles.html (line 22:19)
- test compare-multiple-profiles.html (line 11:14)
- test2 compare-multiple-profiles.html (line 17:15)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-var j = 0;
-function test(len) {
- for (var i = 0; i < len; ++i)
- ++j;
- test2(2000 - len);
-}
-
-function test2(len) {
- for (var i = 0; i < len; ++i)
- --j;
-}
-
-function startTest()
-{
- console.profile("Test");
- test(100);
- console.profileEnd("Test");
-
- console.profile("Test");
- test(1000);
- console.profileEnd("Test");
-
- printProfilesDataWithoutTime();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has multiple profiles with the same name.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. It should not crash or hang and there should be multiple runs of the
-same named profile.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript has a call to new() in it.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to fakeObject() and Array() in it.
-
-Profile title: Using a constructor.
-Thread_1 (no file) (line 0:0)
- startTest constructor.html (line 10:19)
- fakeObject constructor.html (line 19:21)
- Array (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Using a constructor.");
-
- var myObject = new fakeObject(1, 2);
-
- endTest();
-}
-
-function fakeObject (x, y)
-{
- var myArray = new Array()
- myArray[0] = 5;
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript has a call to new() in it.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to fakeObject() and Array()
-in it.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript Has some dead time in the profile.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a large amount of the % spent in (non-JavaScript).
-
-Profile title: Dead time in profile.
-Thread_1 (no file) (line 0:0)
- onload dead-time.html (line 21:44)
- startTest dead-time.html (line 12:19)
- setTimeout (no file) (line 0:0)
- (program) dead-time.html (line 1:1)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Dead time in profile.");
- setTimeout("endTest()", 1234);
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript Has some dead time in the profile.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a large amount of the % spent in
-(non-JavaScript).
-<div id="output"></div>
-</body>
-</html>
-
+++ /dev/null
-
-Profile title: Call Document.write()
-Thread_1 (no file) (line 0:0)
- startTest document-dot-write.html (line 10:19)
- write (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Call Document.write()");
-
- document.write("<div id=\"output\"></div>");
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page calls document.write().
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. If there is a profile it should show write().
-</body>
-</html>
+++ /dev/null
-This page has an event handler.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile insertnewText() should be a sibling to onload().
-
-Profile title: Event handler
-Thread_1 (no file) (line 0:0)
- startTest event-handler.html (line 10:19)
- getElementById (no file) (line 0:0)
- addEventListener (no file) (line 0:0)
- click (no file) (line 0:0)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Event handler");
-
- var myButton = document.getElementById("buttonWithAnEventListener");
- myButton.addEventListener("click", insertNewText, false);
- myButton.click();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has an event handler.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile insertnewText() should be a sibling to onload().
-<input type="button" id="buttonWithAnEventListener" value="Button with an event listener">
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has a call to eval and a script tag on the same line.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be multiple (program) elements and one that represents the eval().
-
-Profile title: Two Execution Contexts on the same line
-Thread_1 (no file) (line 0:0)
- startTest execution-context-and-eval-on-same-line.html (line 10:19)
- evalFunction (no file) (line 1:22)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Two Execution Contexts on the same line");
-
- evalFunction();
-
- endTest();
-}
-</script>
-<script>
-eval("function evalFunction() { insertNewText(); }");
-</script>
-</head>
-
-<body onload="startTest()">
-This page has a call to eval and a script tag on the same line.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be multiple (program) elements and
-one that represents the eval().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has an inline event handler.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile onclick() should be a sibling to onload() and onclick() should have eventListener() as a child.
-
-Profile title: Inline event handler
-Thread_1 (no file) (line 0:0)
- startTest inline-event-handler.html (line 10:19)
- getElementById (no file) (line 0:0)
- click (no file) (line 0:0)
- onclick inline-event-handler.html (line 31:127)
- eventListener inline-event-handler.html (line 17:23)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Inline event handler");
-
- document.getElementById("eventListenerSetInline").click();
-}
-
-function eventListener() {
- anonymousFunction();
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has an inline event handler.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile onclick() should be a sibling to onload() and onclick()
-should have eventListener() as a child.
-<input type="button" onclick="eventListener()" id="eventListenerSetInline" value="Event Listener Set Inline">
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript has many function calls in the same scope.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile many functions should be the children of startTest. Use the sorting capabilites to make sure the similarly named functions are sorted correctly.
-
-Profile title: Many Calls In The Same Scope
-Thread_1 (no file) (line 0:0)
- startTest many-calls-in-the-same-scope.html (line 10:19)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- insertGivenText profiler-test-JS-resources.js (line 9:25)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- arrayOperatorFunction profiler-test-JS-resources.js (line 25:31)
- intermediaryFunction profiler-test-JS-resources.js (line 32:30)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- end many-calls-in-the-same-scope.html (line 26:13)
- endT many-calls-in-the-same-scope.html (line 31:14)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Many Calls In The Same Scope");
-
- insertNewText();
- insertGivenText("This was a triumph.");
- arrayOperatorFunction(7);
- intermediaryFunction();
- anonymousFunction();
- end()
- endT();
- endT();
-
- endTest();
-}
-
-function end()
-{
- var x = 0;
-}
-
-function endT()
-{
- var y = 1;
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript has many function calls in the same scope.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile many functions should be the children of startTest.
-Use the sorting capabilites to make sure the similarly named functions are sorted
-correctly.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls the same anonymous function from multiple and differently scoped locations.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to fakeObject with fakeInteriorFunction as its child, but call() should not be shown.
-
-Profile title: Multiple and different scoped calls to the same anonymous function
-Thread_1 (no file) (line 0:0)
- startTest multiple-and-different-scoped-anonymous-function-calls.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- intermediaryFunction profiler-test-JS-resources.js (line 32:30)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Multiple and different scoped calls to the same anonymous function");
-
- anonymousFunction();
- anonymousFunction();
-
- intermediaryFunction();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls the same anonymous function from multiple and differently scoped locations.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to fakeObject with
-fakeInteriorFunction as its child, but call() should not be shown.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls the same function from multiple and differently scoped locations.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be two calls to insertNewText under startTest() and one under an (anonymous function) under intermediaryFunction().
-
-Profile title: Multiple and different scoped calls to the same function
-Thread_1 (no file) (line 0:0)
- startTest multiple-and-different-scoped-function-calls.html (line 10:19)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- intermediaryFunction profiler-test-JS-resources.js (line 32:30)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Multiple and different scoped calls to the same function");
-
- insertNewText();
- insertNewText();
-
- intermediaryFunction();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls the same function from multiple and differently scoped locations.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be two calls to insertNewText under
-startTest() and one under an (anonymous function) under intermediaryFunction().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls the different anonymous functions the same scope.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call two entries named to (anonymous function), as opposed to one entry called twice.
-
-Profile title: Multiple calls to different anonymous functions
-Thread_1 (no file) (line 0:0)
- startTest multiple-anonymous-functions-called-from-the-same-function.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- anotherAnonymousFunction profiler-test-JS-resources.js (line 30:41)
- insertGivenText profiler-test-JS-resources.js (line 9:25)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Multiple calls to different anonymous functions");
-
- anonymousFunction();
- anotherAnonymousFunction();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls the different anonymous functions the same scope.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call two entries named to (anonymous function),
-as opposed to one entry called twice.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This test has JS executing in another window.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to functionInOtherFrame().
-
-Profile title: Other window executing JavaScript
-Thread_1 (no file) (line 0:0)
- startTest multiple-frames.html (line 10:19)
- getElementById (no file) (line 0:0)
- functionInOtherFrame other-frame.html (line 4:30)
- functionInParentFrame multiple-frames.html (line 21:31)
- insertGivenText profiler-test-JS-resources.js (line 9:25)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Other window executing JavaScript");
-
- var myFrame = document.getElementById("mySubFrame");
- var secret = myFrame.contentWindow.functionInOtherFrame();
- insertGivenText(secret);
-
- endTest();
-}
-
-function functionInParentFrame() {
- return "Pi";
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This test has JS executing in another window.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to functionInOtherFrame().
-<div id="output"></div>
-<iframe src="resources/other-frame.html" id="mySubFrame"></iframe>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls named functions and changes their display names.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. You should see functions named "[x] iteration[s] function", and not "function[x]"
-
-Profile title: Named functions with display names
-Thread_1 (no file) (line 0:0)
- startTest named-functions-with-display-names.html (line 53:19)
- 0 iterations function named-functions-with-display-names.html (line 10:19)
- 1 iteration function named-functions-with-display-names.html (line 17:19)
- 2 iterations function named-functions-with-display-names.html (line 24:19)
- 20 iterations function named-functions-with-display-names.html (line 31:20)
- 1000 iterations function named-functions-with-display-names.html (line 38:22)
- bogusDisplayNameFunction named-functions-with-display-names.html (line 46:34)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function function0()
-{
- for (var i = 0; i < 0; ++i) ;
-}
-
-function0.displayName = "0 iterations function";
-
-function function1()
-{
- for (var i = 0; i < 1; ++i) ;
-}
-
-function1.displayName = "1 iteration function";
-
-function function2()
-{
- for (var i = 0; i < 2; ++i) ;
-}
-
-function2.displayName = "2 iterations function";
-
-function function20()
-{
- for (var i = 0; i < 20; ++i) ;
-}
-
-function20.displayName = "20 iterations function";
-
-function function1000()
-{
- for (var i = 0; i < 1000; ++i) ;
-}
-
-function1000.displayName = "1000 iterations function";
-
-
-function bogusDisplayNameFunction()
-{
- for (var i = 0; i < 0; ++i) ;
-}
-
-bogusDisplayNameFunction.displayName = bogusDisplayNameFunction;
-
-function startTest()
-{
- console.profile("Named functions with display names");
-
- function0();
- function1();
- function2();
- function20();
- function1000();
- bogusDisplayNameFunction();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls named functions and changes their display names.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. You should see functions named "[x] iteration[s] function", and not "function[x]"
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls an anonymous which calls a nested anonymous function.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be an (anonymous function) with a child (anonymous function).
-
-Profile title: Nested anonymous functions called
-Thread_1 (no file) (line 0:0)
- startTest nested-anonymous-functon.html (line 10:19)
- AnonymousFunctionWichCallsAnAnonymousFunction nested-anonymous-functon.html (line 14:65)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Nested anonymous functions called");
-
- var AnonymousFunctionWichCallsAnAnonymousFunction = function() {
- anonymousFunction();
- }
-
- AnonymousFunctionWichCallsAnAnonymousFunction();
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls an anonymous which calls a nested anonymous function.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be an (anonymous function) with a child
-(anonymous function).
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls console.profile() three times then console.profileEnd() three times.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profiler there should be three profiles.
-
-Profile title: Start the profiler the third time.
-Thread_1 (no file) (line 0:0)
- startTest nested-start-and-stop-profiler.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
-Profile title: Start the profiler the third time.
-Thread_1 (no file) (line 0:0)
- startTest nested-start-and-stop-profiler.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-Profile title: Start the profiler the second time.
-Thread_1 (no file) (line 0:0)
- startTest nested-start-and-stop-profiler.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
- profileEnd (no file) (line 0:0)
- printProfilesDataWithoutTime profiler-test-JS-resources.js (line 62:38)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- notifyDone (no file) (line 0:0)
-
-
-Profile title: Start the profiler the third time.
-Thread_1 (no file) (line 0:0)
- startTest nested-start-and-stop-profiler.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-Profile title: Start the profiler the second time.
-Thread_1 (no file) (line 0:0)
- startTest nested-start-and-stop-profiler.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
- profileEnd (no file) (line 0:0)
- printProfilesDataWithoutTime profiler-test-JS-resources.js (line 62:38)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- notifyDone (no file) (line 0:0)
-
-Profile title: Start the profiler the first time.
-Thread_1 (no file) (line 0:0)
- startTest nested-start-and-stop-profiler.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
- profileEnd (no file) (line 0:0)
- printProfilesDataWithoutTime profiler-test-JS-resources.js (line 62:38)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- printProfileNodeWithoutTime profiler-test-JS-resources.js (line 77:37)
- replace (no file) (line 0:0)
- hasObservableSideEffectsForStringReplace (no file) (line 0:0)
- (anonymous function) (no file) (line 0:0)
- anonymous (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- children (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- notifyDone (no file) (line 0:0)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Start the profiler the first time.");
- console.profile("Start the profiler the second time.");
- console.profile("Start the profiler the third time.");
- endTest();
- endTest();
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls console.profile() three times then console.profileEnd()
-three times.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profiler there should be three profiles.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has a no profiling information.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. You should not see any profile date in the WebInspector.
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-</script>
-</head>
-
-<body onload="printProfilesDataWithoutTime()">
-This page has a no profiling information.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. You should not see any profile date in the WebInspector.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has a single script tag with some simple JavaScript.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile.
-
-Profile title: One Execution Context
-Thread_1 (no file) (line 0:0)
- startTest one-execution-context.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("One Execution Context");
- endTest();
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page has a single script tag with some simple JavaScript.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page calls the profiler from the included file.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. If there is a profile that is sufficient for this test.
-
-Profile title: Profile call in included file
-Thread_1 (no file) (line 0:0)
- startProfile profiler-test-JS-resources.js (line 42:22)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- startProfile("Profile call in included file");
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page calls the profiler from the included file.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. If there is a profile that is sufficient for this test.
-<div id="output"></div>
-<script>
-</script>
-</body>
-</html>
+++ /dev/null
-This page creates a profile without a title.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. If there is a profile that is sufficient for this test.
-
-Profile title:
-Thread_1 (no file) (line 0:0)
- startTest profile-with-no-title.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile();
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page creates a profile without a title.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. If there is a profile that is sufficient for this test.
-<div id="output"></div>
-<script>
-</script>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript starts profiling from within a nested location but stops the profiler from a different level of nesting.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to functionWichStartsAndStopsTheProfiler().
-
-Profile title: Profiling From A Nested Location But Stop Profiling Outside The Nesting
-Thread_1 (no file) (line 0:0)
- functionWichStartsTheProfiler profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html (line 16:39)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- functionWichStartsTheProfiler();
- endTest();
-}
-
-function functionWichStartsTheProfiler()
-{
- console.profile("Profiling From A Nested Location But Stop Profiling Outside The Nesting");
-
- for (var i = 0; i < 10000000; i++)
- var b = i + 2;
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript starts profiling from within a nested location but stops the profiler
-from a different level of nesting.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to functionWichStartsAndStopsTheProfiler().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript starts profiling from within a nested location.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to functionWichStartsAndStopsTheProfiler().
-
-Profile title: Profiling From A Nested Location
-Thread_1 (no file) (line 0:0)
- functionWichStartsAndStopsTheProfiler profiling-from-a-nested-location.html (line 15:47)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- functionWichStartsAndStopsTheProfiler();
-}
-
-function functionWichStartsAndStopsTheProfiler()
-{
- console.profile("Profiling From A Nested Location");
-
- for (var i = 0; i < 10000000; i++)
- var b = i + 2;
-
- endTest();
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript starts profiling from within a nested location.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to functionWichStartsAndStopsTheProfiler().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-<html>
-<head>
-<script>
-function functionInOtherFrame() {
- return parent.functionInParentFrame();
-}
-</script>
-</head>
-
-<body>
-This file contains some JavaScript.
-</body>
-</html>
\ No newline at end of file
+++ /dev/null
-<html>
-<head>
-<script src="profiler-test-JS-resources.js"></script>
-<script>
-var interestingKnowledge;
-function otherTestStart()
-{
- interestingKnowledge = isEqualToFive(3);
- opener.windowFinishedLoading();
-}
-
-function functionInOtherWindow() {
- return interestingKnowledge;
-}
-</script>
-</head>
-
-<body onload="otherTestStart()">
-This file executes some JavaScript.
-</body>
-</html>
-
+++ /dev/null
-function endTest() {
- console.profileEnd();
- printProfilesDataWithoutTime();
-
- if (window.testRunner)
- testRunner.notifyDone();
-}
-
-function insertGivenText(text) {
- var paragraph = document.createElement("p");
- paragraph.appendChild(document.createTextNode(text));
- paragraph.style.display = "none"; // Hidden since this isn't important in the test results.
-
- document.getElementById("output").appendChild(paragraph);
-}
-
-function insertNewText() {
- var paragraph = document.createElement("p");
- paragraph.appendChild(document.createTextNode("This is inserted Text"));
- paragraph.style.display = "none"; // Hidden since this isn't important in the test results.
-
- document.getElementById("output").appendChild(paragraph);
-}
-
-function arrayOperatorFunction(arrayElement) {
- return arrayElement + 5;
-}
-
-var anonymousFunction = function () { insertNewText(); };
-var anotherAnonymousFunction = function () { insertGivenText("Another anonymous function was called.") };
-
-function intermediaryFunction()
-{
- anonymousFunction();
-}
-
-function isEqualToFive(input)
-{
- return input === 5;
-}
-
-function startProfile(title)
-{
- console.profile(title);
-}
-
-function printHeavyProfilesDataWithoutTime()
-{
- var preElement = document.createElement("pre");
- preElement.appendChild(document.createTextNode("\n"));
-
- var profiles = internals.consoleProfiles;
- for (var i = 0; i < profiles.length; ++i) {
- preElement.appendChild(document.createTextNode("Profile title: " + profiles[i].title + "\n"));
- printProfileNodeWithoutTime(preElement, profiles[i].heavyProfile.rootNode, 0);
- preElement.appendChild(document.createTextNode("\n"));
- }
-
- document.getElementById("output").appendChild(preElement);
-}
-
-function printProfilesDataWithoutTime()
-{
- var preElement = document.createElement("pre");
- preElement.appendChild(document.createTextNode("\n"));
-
- var profiles = internals.consoleProfiles;
- for (var i = 0; i < profiles.length; ++i) {
- preElement.appendChild(document.createTextNode("Profile title: " + profiles[i].title + "\n"));
- printProfileNodeWithoutTime(preElement, profiles[i].rootNode, 0);
- preElement.appendChild(document.createTextNode("\n"));
- }
-
- document.getElementById("output").appendChild(preElement);
-}
-
-function printProfileNodeWithoutTime(preElement, node, indentLevel)
-{
- var space = "";
- for (var i = 0; i < indentLevel; ++i)
- space += " "
-
- ++indentLevel;
-
- var strippedURL = node.url.replace(/.*\//, "");
- if (!strippedURL)
- strippedURL = "(no file)";
-
- var line = space + node.functionName + " " + strippedURL + " (line " + node.lineNumber + ":" + node.columnNumber + ")\n";
- preElement.appendChild(document.createTextNode(line));
-
- var children = node.children();
- for (var i = 0; i < children.length; ++i)
- printProfileNodeWithoutTime(preElement, children[i], indentLevel);
-}
+++ /dev/null
-This page's JavaScript has an onload event.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. There should be only one onload node.
-
-Profile title: A simple profile test where an event happens.
-Thread_1 (no file) (line 0:0)
- startTest simple-event-call.html (line 10:19)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("A simple profile test where an event happens.");
- // FIXME: this is not testing what it says it is.
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript has an onload event.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. There should be only one onload node.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript starts and stops profiling from the same scope.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. There should be no function calls between console.profile() and console.profileEnd().
-
-Profile title: A simple profile test where no scope chagnes
-Thread_1 (no file) (line 0:0)
- functionWichStartsAndStopsTheProfiler simple-no-level-change.html (line 15:47)
- getElementById (no file) (line 0:0)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- functionWichStartsAndStopsTheProfiler();
-}
-
-function functionWichStartsAndStopsTheProfiler()
-{
- console.profile("A simple profile test where no scope chagnes");
-
- for (var i = 0; i < 10000000; i++)
- var b = i + 2;
-
- document.getElementById("output");
-
- console.profileEnd();
- printProfilesDataWithoutTime();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript starts and stops profiling from the same scope.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. There should be no function calls between console.profile() and
-console.profileEnd().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls console.profile() and console.profileEnd() three times.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profiler there should be three profiles.
-
-Profile title: Start the profiler the first time.
-Thread_1 (no file) (line 0:0)
- startTest start-and-stop-profiler-multiple-times.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
-Profile title: Start the profiler the first time.
-Thread_1 (no file) (line 0:0)
- startTest start-and-stop-profiler-multiple-times.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-Profile title: Start the profiler the second time.
-Thread_1 (no file) (line 0:0)
- startTest start-and-stop-profiler-multiple-times.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
-Profile title: Start the profiler the first time.
-Thread_1 (no file) (line 0:0)
- startTest start-and-stop-profiler-multiple-times.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-Profile title: Start the profiler the second time.
-Thread_1 (no file) (line 0:0)
- startTest start-and-stop-profiler-multiple-times.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-Profile title: Start the profiler the third time.
-Thread_1 (no file) (line 0:0)
- startTest start-and-stop-profiler-multiple-times.html (line 10:19)
- anonymousFunction profiler-test-JS-resources.js (line 29:34)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
- <html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Start the profiler the first time.");
- anonymousFunction();
- endTest();
- console.profile("Start the profiler the second time.");
- anonymousFunction();
- endTest();
- console.profile("Start the profiler the third time.");
- anonymousFunction();
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls console.profile() and console.profileEnd() three times.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profiler there should be three profiles.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript starts profiling from within a nested location.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to functionWichStopsTheProfiler().
-
-Profile title: Profiling From A Nested Location
-Thread_1 (no file) (line 0:0)
- startTest start-and-stop-profiling-in-the-same-function.html (line 10:19)
- functionWichStopsTheProfiler start-and-stop-profiling-in-the-same-function.html (line 17:38)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Profiling From A Nested Location");
-
- functionWichStopsTheProfiler();
-}
-
-function functionWichStopsTheProfiler()
-{
- for (var i = 0; i < 10000000; i++)
- var b = i + 2;
-
- console.profileEnd("Profiling From A Nested Location");
- printProfilesDataWithoutTime();
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript starts profiling from within a nested location.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to functionWichStopsTheProfiler().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript calls console.profile() but not console.profileEnd().
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. You should see the profile running (when that feature is implemented 6060556). Then navigate to another page and check the WebInspector again. Safari should not have crashed and the Inspector should not show a profile (unless we allow cross-load profiling in the future 5951478 & 5954912).
-
-
+++ /dev/null
- <html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Start the profiler but don't stop it.");
- anonymousFunction();
- printProfilesDataWithoutTime();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript calls console.profile() but not console.profileEnd().
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. You should see the profile running (when that feature is implemented 6060556).
-Then navigate to another page and check the WebInspector again. Safari should not
-have crashed and the Inspector should not show a profile (unless we allow cross-load
-profiling in the future 5951478 & 5954912).
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page's JavaScript stops profiling from a timeout.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile endProfile() should not be a child of (program).
-
-Profile title: Stop profiling from a timeout
-Thread_1 (no file) (line 0:0)
- onload stop-profiling-after-setTimeout.html (line 21:44)
- startTest stop-profiling-after-setTimeout.html (line 12:19)
- setTimeout (no file) (line 0:0)
- (program) stop-profiling-after-setTimeout.html (line 1:1)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner) {
- testRunner.dumpAsText();
- testRunner.waitUntilDone();
-}
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Stop profiling from a timeout");
- setTimeout("endTest()", 20);
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript stops profiling from a timeout.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile endProfile() should not be a child of (program).
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has an anonymous JavaScript function that calls built-in functions.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. There should be two nodes in the profile, a "(program)" node with one child that is "test".
-
-Profile title: Test
-Thread_1 (no file) (line 0:0)
- (program) (no file) (line 1:16)
- test stop-then-function-call.html (line 11:14)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-var j = 0;
-function test(len) {
- for (var i = 0; i < len; ++i)
- ++j;
-}
-
-function test2(len) {
- for (var i = 0; i < len; ++i)
- --j;
-}
-
-function startTest()
-{
- var script = "console.profile('Test');\n";
- script += "test(1000);\n";
- script += "console.profileEnd('Test');\n";
- script += "test2(1000);\n";
-
- eval(script);
-
- printProfilesDataWithoutTime();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has an anonymous JavaScript function that calls built-in functions.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. There should be two nodes in the profile, a "(program)" node with one child that is "test".
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-CONSOLE MESSAGE: Test exception.
-This page throws an exception from within eval().
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. The profiler should not crash and still show the stack under insertnewText().
-
-Profile title: Throw within an eval.
-Thread_1 (no file) (line 0)
- (program) throw-exception-from-eval.html (line 19)
- (program) throw-exception-from-eval.html (line 10)
- (program) throw-exception-from-eval.html (line 4)
- (program) throw-exception-from-eval.html (line 19)
- eval (no file) (line 0)
- (program) (no file) (line 1)
- onload throw-exception-from-eval.html (line 24)
- startTest throw-exception-from-eval.html (line 13)
- insertNewText profiler-test-JS-resources.js (line 17)
- createElement (no file) (line 0)
- createTextNode (no file) (line 0)
- appendChild (no file) (line 0)
- getElementById (no file) (line 0)
- endTest profiler-test-JS-resources.js (line 1)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.settings.setLegacyJavaScriptProfilingEnabled(true);
-
-console.profile("Throw within an eval.");
-
-function startTest()
-{
- insertNewText();
-
- endTest();
-}
-</script>
-<script>
-eval("throw('Test exception.');");
-</script>
-</head>
-
-<body onload="startTest()">
-This page throws an exception from within eval().
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. The profiler should not crash and still show the stack under
-insertnewText().
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has two script tags with some simple JavaScript.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be two (program) elements.
-
-Profile title: Two Execution Contexts
-Thread_1 (no file) (line 0:0)
- startTest two-execution-contexts.html (line 10:19)
- intermediaryFunction two-execution-contexts.html (line 17:30)
- testEnd two-execution-contexts.html (line 33:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Two Execution Contexts");
-
- intermediaryFunction();
-}
-
-function intermediaryFunction()
-{
- testEnd();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has two script tags with some simple JavaScript.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be two (program) elements.
-<div id="output"></div>
-</body>
-<script>
-function testEnd() {
- console.profileEnd();
- printProfilesDataWithoutTime();
-}
-</script>
-</html>
+++ /dev/null
-This page has JavaScript that calls built-in functions.
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be calls to createElement() createTextNode() appendChild() and testEnd(), among others.
-This is inserted Text
-
-
-Profile title: User defined function calles built-in functions
-Thread_1 (no file) (line 0:0)
- startTest user-defined-function-calls-built-in-functions.html (line 10:19)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("User defined function calles built-in functions");
-
- var newP = document.createElement("p");
- var textNode =document.createTextNode("This is inserted Text");
- newP.appendChild(textNode);
- var output = document.getElementById("output");
- output.appendChild(newP);
-
- endTest();
-}
-</script>
-</head>
-
-<body onload="startTest()">
-This page has JavaScript that calls built-in functions.
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be calls to createElement() createTextNode()
-appendChild() and testEnd(), among others.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-This page has a call to window.eval().
-
-To run this test manually, load it in the browser then load the WebInspector and look at the profile. In the profile there should be a call to eval().
-
-Profile title: Call window.eval()
-Thread_1 (no file) (line 0:0)
- startTest window-dot-eval.html (line 10:19)
- evalFunction (no file) (line 1:22)
- insertNewText profiler-test-JS-resources.js (line 17:23)
- createElement (no file) (line 0:0)
- createTextNode (no file) (line 0:0)
- appendChild (no file) (line 0:0)
- getElementById (no file) (line 0:0)
- endTest profiler-test-JS-resources.js (line 1:17)
-
-
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-if (window.internals)
- internals.setLegacyJavaScriptProfilingEnabled(true);
-
-function startTest()
-{
- console.profile("Call window.eval()");
-
- evalFunction();
-
- endTest();
-}
-</script>
-<script>
-window.eval("function evalFunction() { insertNewText(); }");
-</script>
-</head>
-
-<body onload="startTest()">
-This page has a call to window.eval().
-<br>
-<br>
-To run this test manually, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to eval().
-<div id="output"></div>
-</body>
-</html>
webkit.org/b/142156 css3/shapes/spec-examples/shape-outside-012.html [ Failure Pass ]
webkit.org/b/142156 css3/shapes/spec-examples/shape-outside-019.html [ Failure Pass ]
-webkit.org/b/142157 fast/profiler/dead-time.html [ Failure Pass ]
-webkit.org/b/142157 fast/profiler/stop-profiling-after-setTimeout.html [ Failure Pass ]
-
webkit.org/b/95551 fast/forms/datalist/update-range-with-datalist.html [ ImageOnlyFailure Pass ]
webkit.org/b/129820 svg/clip-path/mask-nested-clip-path-006.svg [ Pass ImageOnlyFailure ]
webkit.org/b/136066 animations/missing-values-first-keyframe.html [ Crash Pass ]
webkit.org/b/136066 animations/state-at-end-event.html [ Crash Pass ]
-webkit.org/b/136067 fast/profiler/dead-time.html [ Failure Pass ]
-webkit.org/b/136067 fast/profiler/stop-profiling-after-setTimeout.html [ Failure Pass ]
-
webkit.org/b/136070 fast/forms/label/label-becomes-visible-while-clicking-on-label.html [ Failure Pass ]
webkit.org/b/136580 media/context-menu-actions.html [ Timeout Pass ]
fast/preloader/document-write-2.html [ Failure ]
fast/preloader/document-write.html [ Failure ]
fast/preloader/image-srcset.html [ Failure ]
-fast/profiler/profiling-from-a-nested-location-but-stop-profiling-outside-the-nesting.html [ Failure ]
fast/regions/absolute-in-relative-overflow.html [ ImageOnlyFailure ]
fast/regions/absolute-pos-elem-in-region.html [ ImageOnlyFailure ]
fast/regions/animation-element-in-region-flowed-to-other-thread.html [ ImageOnlyFailure ]
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-console.profile("Using the call() method");
-function startTest()
-{
- var myObject = new fakeObject(1, 2);
- endTest();
-}
-
-function fakeObject (x, y)
-{
- this.x = x;
- fakeInteriorFunction.call(this, y);
-}
-
-function fakeInteriorFunction(y)
-{
- this.y = y;
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript has a call to call() in it.
-<br>
-<br>
-To use this test, load it in the browser then load the WebInspector and look at
-the profile. In the profile there should be a call to fakeObject() with call() as
-its child and a fakeInteriorFunction() as call()'s child.
-<div id="output"></div>
-</body>
-</html>
+++ /dev/null
-<html>
-<head>
-<script src="resources/profiler-test-JS-resources.js"></script>
-<script>
-console.profile("Many Calls In The Same Scope");
-function startTest()
-{
- insertNewText();
- insertGivenText("This was a triumph.");
- arrayOperatorFunction(7);
- intermediaryFunction();
- anonymousFunction();
- end()
- endT();
- endT();
- endTest();
-}
-
-function end()
-{
- var x = 0;
-}
-
-function endT()
-{
- var y = 1;
-}
-
-</script>
-</head>
-
-<body onload="startTest()">
-This page's JavaScript has many function calls in the same scope.
-<br>
-<br>
-To use this test, load it in the browser then load the WebInspector and look at
-the profile. In the profile many functions should be the children of startTest.
-Use the sorting capabilites to make sure the similarly named functions are sorted
-correctly.
-<div id="output"></div>
-</body>
-</html>
\ No newline at end of file
+2016-05-20 Joseph Pecoraro <pecoraro@apple.com>
+
+ Remove LegacyProfiler
+ https://bugs.webkit.org/show_bug.cgi?id=153565
+
+ Reviewed by Saam Barati.
+
+ * inspector/protocol/Timeline.json:
+ * jsc.cpp:
+ * runtime/JSGlobalObject.cpp:
+ (JSC::JSGlobalObject::hasLegacyProfiler):
+ * runtime/JSGlobalObject.h:
+ (JSC::JSGlobalObject::supportsLegacyProfiling): Deleted.
+
2016-05-20 Saam barati <sbarati@apple.com>
JSScope::abstractAccess doesn't need to copy the SymbolTableEntry, it can use it by reference
{ "name": "data", "type": "object", "description": "Event data." },
{ "name": "children", "type": "array", "optional": true, "items": { "$ref": "TimelineEvent" }, "description": "Nested records." }
]
- },
- {
- "id": "CPUProfileNodeAggregateCallInfo",
- "type": "object",
- "description": "Aggregate CPU Profile call info. Holds time information for all the calls that happened on a node.",
- "properties": [
- { "name": "callCount", "type": "number", "description": "Total number of calls." },
- { "name": "startTime", "type": "number", "description": "Start time for the first call." },
- { "name": "endTime", "type": "number", "description": "End time for the last call." },
- { "name": "totalTime", "type": "number", "description": "Total execution time for all calls combined." }
- ]
- },
- {
- "id": "CPUProfileNode",
- "type": "object",
- "description": "CPU Profile node. Holds callsite information, execution statistics and child nodes.",
- "properties": [
- { "name": "id", "type": "integer", "description": "Unique identifier for this call site." },
- { "name": "callInfo", "$ref": "CPUProfileNodeAggregateCallInfo", "description": "Aggregate info about all the calls that making up this node." },
- { "name": "functionName", "type": "string", "optional": true, "description": "Function name." },
- { "name": "url", "type": "string", "optional": true, "description": "URL." },
- { "name": "lineNumber", "type": "integer", "optional": true, "description": "Line number." },
- { "name": "columnNumber", "type": "integer", "optional": true, "description": "Column number." },
- { "name": "children", "type": "array", "items": { "$ref": "CPUProfileNode" }, "optional": true, "description": "Child nodes." }
- ]
- },
- {
- "id": "CPUProfile",
- "type": "object",
- "description": "Profile.",
- "properties": [
- { "name": "rootNodes", "type": "array", "items": { "$ref": "CPUProfileNode" }, "description": "Top level nodes in the stack." },
- { "name": "idleTime", "type": "number", "optional": true }
- ]
}
],
"commands": [
};
const ClassInfo GlobalObject::s_info = { "global", &JSGlobalObject::s_info, nullptr, CREATE_METHOD_TABLE(GlobalObject) };
-const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, nullptr, nullptr };
+const GlobalObjectMethodTable GlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, 0, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, nullptr, nullptr };
GlobalObject::GlobalObject(VM& vm, Structure* structure)
const ClassInfo JSGlobalObject::s_info = { "GlobalObject", &Base::s_info, &globalObjectTable, CREATE_METHOD_TABLE(JSGlobalObject) };
-const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, nullptr, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
+const GlobalObjectMethodTable JSGlobalObject::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, nullptr, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
/* Source for JSGlobalObject.lut.h
@begin globalObjectTable
bool JSGlobalObject::hasLegacyProfiler() const
{
- return globalObjectMethodTable()->supportsLegacyProfiling(this);
+ // FIXME: Remove Legacy Profiler from JavaScriptCore.
+ return false;
}
bool JSGlobalObject::put(JSCell* cell, ExecState* exec, PropertyName propertyName, JSValue value, PutPropertySlot& slot)
typedef bool (*AllowsAccessFromFunctionPtr)(const JSGlobalObject*, ExecState*);
AllowsAccessFromFunctionPtr allowsAccessFrom;
- typedef bool (*SupportsLegacyProfilingFunctionPtr)(const JSGlobalObject*);
- SupportsLegacyProfilingFunctionPtr supportsLegacyProfiling;
-
typedef bool (*SupportsRichSourceInfoFunctionPtr)(const JSGlobalObject*);
SupportsRichSourceInfoFunctionPtr supportsRichSourceInfo;
const GlobalObjectMethodTable* globalObjectMethodTable() const { return m_globalObjectMethodTable; }
static bool allowsAccessFrom(const JSGlobalObject*, ExecState*) { return true; }
- static bool supportsLegacyProfiling(const JSGlobalObject*) { return false; }
static bool supportsRichSourceInfo(const JSGlobalObject*) { return true; }
JS_EXPORT_PRIVATE ExecState* globalExec();
inspector/CommandLineAPIHost.idl
inspector/InspectorFrontendHost.idl
- inspector/ScriptProfile.idl
- inspector/ScriptProfileNode.idl
loader/appcache/DOMApplicationCache.idl
+2016-05-20 Joseph Pecoraro <pecoraro@apple.com>
+
+ Remove LegacyProfiler
+ https://bugs.webkit.org/show_bug.cgi?id=153565
+
+ Reviewed by Saam Barati.
+
+ JavaScriptCore now provides a sampling profiler and it is enabled
+ by all ports. Web Inspector switched months ago to using the
+ sampling profiler and displaying its data. Remove the legacy
+ profiler, as it is no longer being used by anything other then
+ console.profile and tests. We will update console.profile's
+ behavior soon to have new behavior and use the sampling data.
+
+ * CMakeLists.txt:
+ * DerivedSources.cpp:
+ * DerivedSources.make:
+ * ForwardingHeaders/profiler/LegacyProfiler.h: Removed.
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSCustomXPathNSResolver.cpp:
+ * bindings/js/JSDOMWindowBase.cpp:
+ (WebCore::JSDOMWindowBase::supportsLegacyProfiling): Deleted.
+ (WebCore::JSDOMWindowBase::supportsRichSourceInfo): Deleted.
+ * bindings/js/JSDOMWindowBase.h:
+ * bindings/js/JSWorkerGlobalScopeBase.cpp:
+ (WebCore::JSWorkerGlobalScopeBase::supportsLegacyProfiling): Deleted.
+ * bindings/js/JSWorkerGlobalScopeBase.h:
+ * bindings/js/ScriptCachedFrameData.cpp:
+ * bindings/js/ScriptController.cpp:
+ (WebCore::ScriptController::clearWindowShell): Deleted.
+ * bindings/js/ScriptProfile.h: Removed.
+ * bindings/js/ScriptProfileNode.h: Removed.
+ * bindings/scripts/CodeGeneratorJS.pm:
+ (AddClassForwardIfNeeded): Deleted.
+ * bindings/scripts/test/JS/JSTestObj.cpp:
+ (WebCore::jsTestObjPrototypeFunctionMethodWithSequenceArg): Deleted.
+ (WebCore::jsTestObjPrototypeFunctionMethodReturningSequence): Deleted.
+ * bindings/scripts/test/TestObj.idl:
+ * css/CSSParser.cpp:
+ * dom/Document.cpp:
+ * inspector/InspectorConsoleInstrumentation.h:
+ (WebCore::InspectorInstrumentation::stopProfiling):
+ * inspector/InspectorController.cpp:
+ (WebCore::InspectorController::InspectorController):
+ (WebCore::InspectorController::legacyProfilerEnabled): Deleted.
+ (WebCore::InspectorController::setLegacyProfilerEnabled): Deleted.
+ * inspector/InspectorController.h:
+ * inspector/InspectorInstrumentation.cpp:
+ (WebCore::InspectorInstrumentation::stopProfilingImpl):
+ * inspector/InspectorInstrumentation.h:
+ * inspector/InspectorTimelineAgent.cpp:
+ (WebCore::InspectorTimelineAgent::startFromConsole):
+ (WebCore::InspectorTimelineAgent::stopFromConsole):
+ * inspector/InspectorTimelineAgent.h:
+ * inspector/PageDebuggerAgent.cpp:
+ * inspector/PageRuntimeAgent.cpp:
+ * inspector/ScriptProfile.idl: Removed.
+ * inspector/ScriptProfileNode.idl: Removed.
+ * inspector/TimelineRecordFactory.cpp:
+ (WebCore::buildAggregateCallInfoInspectorObject): Deleted.
+ (WebCore::buildInspectorObject): Deleted.
+ (WebCore::buildProfileInspectorObject): Deleted.
+ (WebCore::TimelineRecordFactory::appendProfile): Deleted.
+ * inspector/TimelineRecordFactory.h:
+ * page/DOMWindow.cpp:
+ * page/Page.cpp:
+ * page/PageConsoleClient.cpp:
+ (WebCore::PageConsoleClient::profileEnd):
+ (WebCore::PageConsoleClient::clearProfiles): Deleted.
+ * page/PageConsoleClient.h:
+ * testing/Internals.cpp:
+ (WebCore::Internals::resetToConsistentState): Deleted.
+ (WebCore::Internals::consoleProfiles): Deleted.
+ (WebCore::Internals::setLegacyJavaScriptProfilingEnabled): Deleted.
+ * testing/Internals.h:
+ * testing/Internals.idl:
+
2016-05-20 Zalan Bujtas <zalan@apple.com>
`width: 1%` on nested table cell causes its table to hog horizontal space
#include "JSRTCTrackEvent.cpp"
#include "JSScreen.cpp"
#include "JSScriptProcessorNode.cpp"
-#include "JSScriptProfile.cpp"
-#include "JSScriptProfileNode.cpp"
#if ENABLE(CSP_NEXT)
#include "JSSecurityPolicyViolationEvent.cpp"
#endif
$(WebCore)/html/track/VTTCue.idl \
$(WebCore)/inspector/CommandLineAPIHost.idl \
$(WebCore)/inspector/InspectorFrontendHost.idl \
- $(WebCore)/inspector/ScriptProfile.idl \
- $(WebCore)/inspector/ScriptProfileNode.idl \
$(WebCore)/loader/appcache/DOMApplicationCache.idl \
$(WebCore)/page/AbstractView.idl \
$(WebCore)/page/BarProp.idl \
+++ /dev/null
-#ifndef WebCore_FWD_LegacyProfiler_h
-#define WebCore_FWD_LegacyProfiler_h
-#include <JavaScriptCore/LegacyProfiler.h>
-#endif
-
9DAC7C541AF2CAA100437C44 /* CSSContentDistributionValue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9DAC7C521AF2CAA100437C44 /* CSSContentDistributionValue.cpp */; };
9DAC7C551AF2CAA200437C44 /* CSSContentDistributionValue.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DAC7C531AF2CAA100437C44 /* CSSContentDistributionValue.h */; };
9DAC7C571AF2CB6400437C44 /* StyleContentAlignmentData.h in Headers */ = {isa = PBXBuildFile; fileRef = 9DAC7C561AF2CB6400437C44 /* StyleContentAlignmentData.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9F72304C11184B4100AD0126 /* ScriptProfile.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 9FA37EE41172FC8000C4CD55 /* ScriptProfileNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FA37EE31172FC8000C4CD55 /* ScriptProfileNode.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 9FA37EFA1172FDA600C4CD55 /* JSScriptProfile.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FA37EF61172FD9300C4CD55 /* JSScriptProfile.cpp */; };
- 9FA37EFB1172FDA600C4CD55 /* JSScriptProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FA37EF71172FD9300C4CD55 /* JSScriptProfile.h */; };
- 9FA37EFC1172FDA600C4CD55 /* JSScriptProfileNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */; };
- 9FA37EFD1172FDA600C4CD55 /* JSScriptProfileNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */; };
A07D3355152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = A07D3353152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp */; };
A07D3356152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3354152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h */; };
A07D3358152B632D001B6393 /* WebGLShaderPrecisionFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = A07D3357152B632D001B6393 /* WebGLShaderPrecisionFormat.h */; };
9DAC7C521AF2CAA100437C44 /* CSSContentDistributionValue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSContentDistributionValue.cpp; sourceTree = "<group>"; };
9DAC7C531AF2CAA100437C44 /* CSSContentDistributionValue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSContentDistributionValue.h; sourceTree = "<group>"; };
9DAC7C561AF2CB6400437C44 /* StyleContentAlignmentData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StyleContentAlignmentData.h; sourceTree = "<group>"; };
- 9F72304C11184B4100AD0126 /* ScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfile.h; sourceTree = "<group>"; };
- 9FA37EE31172FC8000C4CD55 /* ScriptProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScriptProfileNode.h; sourceTree = "<group>"; };
- 9FA37EEF1172FD4100C4CD55 /* ScriptProfile.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScriptProfile.idl; sourceTree = "<group>"; };
- 9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ScriptProfileNode.idl; sourceTree = "<group>"; };
- 9FA37EF61172FD9300C4CD55 /* JSScriptProfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptProfile.cpp; sourceTree = "<group>"; };
- 9FA37EF71172FD9300C4CD55 /* JSScriptProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptProfile.h; sourceTree = "<group>"; };
- 9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSScriptProfileNode.cpp; sourceTree = "<group>"; };
- 9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSScriptProfileNode.h; sourceTree = "<group>"; };
A07D3353152B630E001B6393 /* JSWebGLShaderPrecisionFormat.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebGLShaderPrecisionFormat.cpp; sourceTree = "<group>"; };
A07D3354152B630E001B6393 /* JSWebGLShaderPrecisionFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSWebGLShaderPrecisionFormat.h; sourceTree = "<group>"; };
A07D3357152B632D001B6393 /* WebGLShaderPrecisionFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebGLShaderPrecisionFormat.h; sourceTree = "<group>"; };
A584FE3A1864E2D800843B10 /* JSCommandLineAPIHost.h */,
7A0E771C10C00DB100A0276E /* JSInspectorFrontendHost.cpp */,
7A0E771D10C00DB100A0276E /* JSInspectorFrontendHost.h */,
- 9FA37EF61172FD9300C4CD55 /* JSScriptProfile.cpp */,
- 9FA37EF71172FD9300C4CD55 /* JSScriptProfile.h */,
- 9FA37EF81172FD9300C4CD55 /* JSScriptProfileNode.cpp */,
- 9FA37EF91172FD9300C4CD55 /* JSScriptProfileNode.h */,
);
name = Inspector;
sourceTree = "<group>";
F382088D147D35F90010BC06 /* PageRuntimeAgent.h */,
A5F36D3818F758720054C024 /* PageScriptDebugServer.cpp */,
A5F36D3918F758720054C024 /* PageScriptDebugServer.h */,
- 9FA37EEF1172FD4100C4CD55 /* ScriptProfile.idl */,
- 9FA37EF01172FD4100C4CD55 /* ScriptProfileNode.idl */,
7553CFE7108F473F00EA281E /* TimelineRecordFactory.cpp */,
7553CFE6108F473F00EA281E /* TimelineRecordFactory.h */,
A56C5B98189F34570082D13C /* WebConsoleAgent.cpp */,
A83E1C720E49042B00140B9C /* ScriptControllerMac.mm */,
41F066E30F64BCF600A07EAC /* ScriptGlobalObject.cpp */,
41F066E20F64BCF600A07EAC /* ScriptGlobalObject.h */,
- 9F72304C11184B4100AD0126 /* ScriptProfile.h */,
- 9FA37EE31172FC8000C4CD55 /* ScriptProfileNode.h */,
934CC1090EDB223900A658F2 /* ScriptSourceCode.h */,
4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */,
41C760B00EDE03D300C1655F /* ScriptState.h */,
5E2C436C1BCF071E0001E2BC /* JSRTCTrackEvent.h in Headers */,
BCEC01C30C274DDD009F4EC9 /* JSScreen.h in Headers */,
FDA15ECE12B03F61003A583A /* JSScriptProcessorNode.h in Headers */,
- 9FA37EFB1172FDA600C4CD55 /* JSScriptProfile.h in Headers */,
- 9FA37EFD1172FDA600C4CD55 /* JSScriptProfileNode.h in Headers */,
CED06AD11C77754800FDFAF1 /* JSSecurityPolicyViolationEvent.h in Headers */,
9BDA64D81B975CF2009C4387 /* JSShadowRoot.h in Headers */,
CD9DE17B17AAC75B00EA386D /* JSSourceBuffer.h in Headers */,
E11C9D9B0EB3681200E409DB /* ScriptExecutionContext.h in Headers */,
41F066E40F64BCF600A07EAC /* ScriptGlobalObject.h in Headers */,
FD31603612B0267600C1A359 /* ScriptProcessorNode.h in Headers */,
- 9F72304F11184B4100AD0126 /* ScriptProfile.h in Headers */,
- 9FA37EE41172FC8000C4CD55 /* ScriptProfileNode.h in Headers */,
8A413AE01207BBA50082016E /* ScriptRunner.h in Headers */,
934CC10A0EDB223900A658F2 /* ScriptSourceCode.h in Headers */,
41C760B10EDE03D300C1655F /* ScriptState.h in Headers */,
5E2C436B1BCF071E0001E2BC /* JSRTCTrackEvent.cpp in Sources */,
BCEC01C20C274DDD009F4EC9 /* JSScreen.cpp in Sources */,
FDA15ECD12B03F61003A583A /* JSScriptProcessorNode.cpp in Sources */,
- 9FA37EFA1172FDA600C4CD55 /* JSScriptProfile.cpp in Sources */,
- 9FA37EFC1172FDA600C4CD55 /* JSScriptProfileNode.cpp in Sources */,
CED06AD01C77754800FDFAF1 /* JSSecurityPolicyViolationEvent.cpp in Sources */,
9BDA64D71B975CE5009C4387 /* JSShadowRoot.cpp in Sources */,
CD9DE17A17AAC75B00EA386D /* JSSourceBuffer.cpp in Sources */,
#include "Page.h"
#include "PageConsoleClient.h"
#include "SecurityOrigin.h"
-#include <profiler/Profile.h>
#include <runtime/JSLock.h>
#include <wtf/Ref.h>
const ClassInfo JSDOMWindowBase::s_info = { "Window", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMWindowBase) };
-const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, &moduleLoaderEvaluate, &defaultLanguage };
+const GlobalObjectMethodTable JSDOMWindowBase::s_globalObjectMethodTable = { &shouldAllowAccessFrom, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, &moduleLoaderResolve, &moduleLoaderFetch, nullptr, nullptr, &moduleLoaderEvaluate, &defaultLanguage };
JSDOMWindowBase::JSDOMWindowBase(VM& vm, Structure* structure, PassRefPtr<DOMWindow> window, JSDOMWindowShell* shell)
: JSDOMGlobalObject(vm, structure, &shell->world(), &s_globalObjectMethodTable)
printErrorMessageForFrame(wrapped().frame(), message);
}
-bool JSDOMWindowBase::supportsLegacyProfiling(const JSGlobalObject* object)
-{
- const JSDOMWindowBase* thisObject = static_cast<const JSDOMWindowBase*>(object);
- Frame* frame = thisObject->wrapped().frame();
- if (!frame)
- return false;
-
- Page* page = frame->page();
- if (!page)
- return false;
-
- return page->inspectorController().legacyProfilerEnabled();
-}
-
bool JSDOMWindowBase::supportsRichSourceInfo(const JSGlobalObject* object)
{
const JSDOMWindowBase* thisObject = static_cast<const JSDOMWindowBase*>(object);
bool enabled = page->inspectorController().enabled();
ASSERT(enabled || !thisObject->debugger());
- ASSERT(enabled || !supportsLegacyProfiling(thisObject));
return enabled;
}
static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
- static bool supportsLegacyProfiling(const JSC::JSGlobalObject*);
static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
static bool shouldInterruptScript(const JSC::JSGlobalObject*);
static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
const ClassInfo JSWorkerGlobalScopeBase::s_info = { "WorkerGlobalScope", &JSDOMGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSWorkerGlobalScopeBase) };
-const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsLegacyProfiling, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, &defaultLanguage };
+const GlobalObjectMethodTable JSWorkerGlobalScopeBase::s_globalObjectMethodTable = { &allowsAccessFrom, &supportsRichSourceInfo, &shouldInterruptScript, &javaScriptRuntimeFlags, &queueTaskToEventLoop, &shouldInterruptScriptBeforeTimeout, nullptr, nullptr, nullptr, nullptr, nullptr, &defaultLanguage };
JSWorkerGlobalScopeBase::JSWorkerGlobalScopeBase(JSC::VM& vm, JSC::Structure* structure, PassRefPtr<WorkerGlobalScope> impl)
: JSDOMGlobalObject(vm, structure, &normalWorld(vm), &s_globalObjectMethodTable)
return JSGlobalObject::allowsAccessFrom(object, exec);
}
-bool JSWorkerGlobalScopeBase::supportsLegacyProfiling(const JSGlobalObject* object)
-{
- return JSGlobalObject::supportsLegacyProfiling(object);
-}
-
bool JSWorkerGlobalScopeBase::supportsRichSourceInfo(const JSGlobalObject* object)
{
return JSGlobalObject::supportsRichSourceInfo(object);
static const JSC::GlobalObjectMethodTable s_globalObjectMethodTable;
static bool allowsAccessFrom(const JSC::JSGlobalObject*, JSC::ExecState*);
- static bool supportsLegacyProfiling(const JSC::JSGlobalObject*);
static bool supportsRichSourceInfo(const JSC::JSGlobalObject*);
static bool shouldInterruptScript(const JSC::JSGlobalObject*);
static bool shouldInterruptScriptBeforeTimeout(const JSC::JSGlobalObject*);
#include "PageGroup.h"
#include "ScriptController.h"
#include <heap/StrongInlines.h>
-#include <profiler/Profile.h>
#include <runtime/JSLock.h>
#include <runtime/WeakGCMapInlines.h>
#include <debugger/Debugger.h>
#include <heap/StrongInlines.h>
#include <inspector/ScriptCallStack.h>
-#include <profiler/Profile.h>
#include <runtime/InitializeThreading.h>
#include <runtime/JSLock.h>
#include <wtf/Threading.h>
attachDebugger(windowShell, nullptr);
windowShell->window()->setConsoleClient(nullptr);
- // FIXME: We should clear console profiles for each frame as soon as the frame is destroyed.
- // Instead of clearing all of them when the main frame is destroyed.
- if (m_frame.isMainFrame()) {
- if (Page* page = m_frame.page())
- page->console().clearProfiles();
- }
-
windowShell->window()->willRemoveFromWindowShell();
windowShell->setWindow(newDOMWindow);
+++ /dev/null
-/*
- * Copyright (C) 2010, 2014 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScriptProfile_h
-#define ScriptProfile_h
-
-#include <profiler/Profile.h>
-
-namespace WebCore {
-
-typedef JSC::Profile ScriptProfile;
-
-} // namespace WebCore
-
-#endif // ScriptProfile_h
+++ /dev/null
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ScriptProfileNode_h
-#define ScriptProfileNode_h
-
-#include <profiler/ProfileNode.h>
-
-namespace WebCore {
-
-typedef JSC::ProfileNode ScriptProfileNode;
-
-} // namespace WebCore
-
-#endif // ScriptProfileNode_h
{
my $interfaceName = shift;
- if ($interfaceName eq "ScriptProfileNode") {
- $headerIncludes{"<profiler/ProfileNode.h>"} = 1;
- push(@headerContent, "typedef JSC::ProfileNode ScriptProfileNode;\n\n");
- return;
- }
-
# SVGAnimatedLength/Number/etc. are typedefs and should not be forward-declared as classes.
return if $codeGenerator->IsSVGAnimatedType($interfaceName);
#include "JSNode.h"
#include "JSSVGDocument.h"
#include "JSSVGPoint.h"
-#include "JSScriptProfile.h"
#include "JSTestCallback.h"
#include "JSTestCallbackFunction.h"
#include "JSTestNode.h"
#include "SVGDocument.h"
#include "SVGPoint.h"
#include "SVGStaticPropertyTearOff.h"
-#include "ScriptProfile.h"
#include "SerializedScriptValue.h"
#include "Settings.h"
#include "TestObj.h"
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjConstructorFunctionNullableStringStaticMethod(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionNullableStringSpecialMethod(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(JSC::ExecState*);
-JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArg(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue(JSC::ExecState*);
{ "methodWithXPathNSResolverParameter", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithXPathNSResolverParameter), (intptr_t) (1) } },
{ "nullableStringMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringMethod), (intptr_t) (0) } },
{ "nullableStringSpecialMethod", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionNullableStringSpecialMethod), (intptr_t) (1) } },
- { "methodWithSequenceArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithSequenceArg), (intptr_t) (1) } },
- { "methodReturningSequence", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodReturningSequence), (intptr_t) (1) } },
{ "methodWithEnumArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithEnumArg), (intptr_t) (1) } },
{ "methodWithOptionalEnumArg", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalEnumArg), (intptr_t) (0) } },
{ "methodWithOptionalEnumArgAndDefaultValue", JSC::Function, NoIntrinsic, { (intptr_t)static_cast<NativeFunction>(jsTestObjPrototypeFunctionMethodWithOptionalEnumArgAndDefaultValue), (intptr_t) (0) } },
return JSValue::encode(result);
}
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithSequenceArg(ExecState* state)
-{
- JSValue thisValue = state->thisValue();
- auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
- if (UNLIKELY(!castedThis))
- return throwThisTypeError(*state, "TestObj", "methodWithSequenceArg");
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
- auto& impl = castedThis->wrapped();
- if (UNLIKELY(state->argumentCount() < 1))
- return throwVMError(state, createNotEnoughArgumentsError(state));
- auto sequenceArg = (toRefPtrNativeArray<ScriptProfile, JSScriptProfile>(state, state->argument(0), &JSScriptProfile::toWrapped));
- if (UNLIKELY(state->hadException()))
- return JSValue::encode(jsUndefined());
- impl.methodWithSequenceArg(WTFMove(sequenceArg));
- return JSValue::encode(jsUndefined());
-}
-
-EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodReturningSequence(ExecState* state)
-{
- JSValue thisValue = state->thisValue();
- auto castedThis = jsDynamicCast<JSTestObj*>(thisValue);
- if (UNLIKELY(!castedThis))
- return throwThisTypeError(*state, "TestObj", "methodReturningSequence");
- ASSERT_GC_OBJECT_INHERITS(castedThis, JSTestObj::info());
- auto& impl = castedThis->wrapped();
- if (UNLIKELY(state->argumentCount() < 1))
- return throwVMError(state, createNotEnoughArgumentsError(state));
- auto longArg = convert<int32_t>(*state, state->argument(0), NormalConversion);
- if (UNLIKELY(state->hadException()))
- return JSValue::encode(jsUndefined());
- JSValue result = jsArray(state, castedThis->globalObject(), impl.methodReturningSequence(WTFMove(longArg)));
- return JSValue::encode(result);
-}
-
EncodedJSValue JSC_HOST_CALL jsTestObjPrototypeFunctionMethodWithEnumArg(ExecState* state)
{
JSValue thisValue = state->thisValue();
static DOMString? nullableStringStaticMethod();
getter DOMString? nullableStringSpecialMethod(unsigned long index);
- void methodWithSequenceArg(sequence<ScriptProfile> sequenceArg);
- sequence<ScriptProfile> methodReturningSequence(long longArg);
-
void methodWithEnumArg(TestEnumType enumArg);
void methodWithOptionalEnumArg(optional TestEnumType enumArg);
void methodWithOptionalEnumArgAndDefaultValue(optional TestEnumType enumArg = "EnumValue1");
#include "WebKitCSSFilterValue.h"
#include "WebKitCSSRegionRule.h"
#include "WebKitCSSTransformValue.h"
-#include <JavaScriptCore/Profile.h>
#include <bitset>
#include <limits.h>
#include <wtf/HexNumber.h>
#include "XPathNSResolver.h"
#include "XPathResult.h"
#include "htmlediting.h"
-#include <JavaScriptCore/Profile.h>
#include <ctime>
#include <inspector/ScriptCallStack.h>
#include <wtf/CurrentTime.h>
#define InspectorConsoleInstrumentation_h
#include "InspectorInstrumentation.h"
-#include "ScriptProfile.h"
#include <inspector/ScriptArguments.h>
#include <inspector/ScriptCallStack.h>
startProfilingImpl(instrumentingAgentsForPage(page), exec, title);
}
-inline RefPtr<JSC::Profile> InspectorInstrumentation::stopProfiling(Page& page, JSC::ExecState* exec, const String &title)
+inline void InspectorInstrumentation::stopProfiling(Page& page, JSC::ExecState* exec, const String &title)
{
- return stopProfilingImpl(instrumentingAgentsForPage(page), exec, title);
+ stopProfilingImpl(instrumentingAgentsForPage(page), exec, title);
}
} // namespace WebCore
#include <inspector/agents/InspectorAgent.h>
#include <inspector/agents/InspectorHeapAgent.h>
#include <inspector/agents/InspectorScriptProfilerAgent.h>
-#include <profiler/LegacyProfiler.h>
#include <runtime/JSLock.h>
#include <wtf/Stopwatch.h>
m_instrumentingAgents->setWebConsoleAgent(consoleAgentPtr.get());
m_agents.append(WTFMove(consoleAgentPtr));
- auto timelineAgentPtr = std::make_unique<InspectorTimelineAgent>(pageContext, scriptProfilerAgent, heapAgent, pageAgent);
- m_timelineAgent = timelineAgentPtr.get();
- m_agents.append(WTFMove(timelineAgentPtr));
-
auto debuggerAgentPtr = std::make_unique<PageDebuggerAgent>(pageContext, pageAgent, m_overlay.get());
PageDebuggerAgent* debuggerAgent = debuggerAgentPtr.get();
m_agents.append(WTFMove(debuggerAgentPtr));
+ m_agents.append(std::make_unique<InspectorTimelineAgent>(pageContext, scriptProfilerAgent, heapAgent, pageAgent));
m_agents.append(std::make_unique<InspectorDOMDebuggerAgent>(pageContext, m_domAgent, debuggerAgent));
m_agents.append(std::make_unique<InspectorApplicationCacheAgent>(pageContext, pageAgent));
m_agents.append(std::make_unique<InspectorLayerTreeAgent>(pageContext));
#endif
}
-bool InspectorController::legacyProfilerEnabled() const
-{
- return m_legacyProfilerEnabled;
-}
-
-void InspectorController::setLegacyProfilerEnabled(bool enable)
-{
- m_legacyProfilerEnabled = enable;
-
- ErrorString unused;
- if (enable) {
- m_instrumentingAgents->setPersistentInspectorTimelineAgent(m_timelineAgent);
- m_scriptDebugServer.recompileAllJSFunctions();
- m_timelineAgent->start(unused);
- } else {
- m_instrumentingAgents->setPersistentInspectorTimelineAgent(nullptr);
- m_scriptDebugServer.recompileAllJSFunctions();
- m_timelineAgent->stop(unused);
- }
-}
-
bool InspectorController::developerExtrasEnabled() const
{
return m_page.settings().developerExtrasEnabled();
class InspectorFrontendClient;
class InspectorInstrumentation;
class InspectorPageAgent;
-class InspectorTimelineAgent;
class InstrumentingAgents;
class Node;
class Page;
void setIsUnderTest(bool isUnderTest) { m_isUnderTest = isUnderTest; }
WEBCORE_EXPORT void evaluateForTestInFrontend(const String& script);
- WEBCORE_EXPORT bool legacyProfilerEnabled() const;
- WEBCORE_EXPORT void setLegacyProfilerEnabled(bool);
-
InspectorClient* inspectorClient() const { return m_inspectorClient; }
InspectorFrontendClient* inspectorFrontendClient() const { return m_inspectorFrontendClient; }
InspectorPageAgent* pageAgent() const { return m_pageAgent; }
Inspector::InspectorAgent* m_inspectorAgent { nullptr };
InspectorDOMAgent* m_domAgent { nullptr };
InspectorPageAgent* m_pageAgent { nullptr };
- InspectorTimelineAgent* m_timelineAgent { nullptr };
bool m_isUnderTest { false };
bool m_isAutomaticInspection { false };
- bool m_legacyProfilerEnabled { false };
};
} // namespace WebCore
#include <inspector/ScriptArguments.h>
#include <inspector/ScriptCallStack.h>
#include <inspector/agents/InspectorDebuggerAgent.h>
-#include <profiler/Profile.h>
#include <runtime/ConsoleTypes.h>
#include <wtf/StdLibExtras.h>
#include <wtf/text/CString.h>
timelineAgent->startFromConsole(exec, title);
}
-RefPtr<JSC::Profile> InspectorInstrumentation::stopProfilingImpl(InstrumentingAgents& instrumentingAgents, JSC::ExecState* exec, const String& title)
+void InspectorInstrumentation::stopProfilingImpl(InstrumentingAgents& instrumentingAgents, JSC::ExecState* exec, const String& title)
{
if (InspectorTimelineAgent* timelineAgent = instrumentingAgents.persistentInspectorTimelineAgent())
- return timelineAgent->stopFromConsole(exec, title);
- return nullptr;
+ timelineAgent->stopFromConsole(exec, title);
}
void InspectorInstrumentation::didOpenDatabaseImpl(InstrumentingAgents& instrumentingAgents, RefPtr<Database>&& database, const String& domain, const String& name, const String& version)
class ScriptCallStack;
}
-namespace JSC {
-class Profile;
-}
-
namespace WebCore {
class CSSRule;
static void didFireAnimationFrame(const InspectorInstrumentationCookie&);
static void startProfiling(Page&, JSC::ExecState*, const String& title);
- static RefPtr<JSC::Profile> stopProfiling(Page&, JSC::ExecState*, const String& title);
+ static void stopProfiling(Page&, JSC::ExecState*, const String& title);
static void didOpenDatabase(ScriptExecutionContext*, RefPtr<Database>&&, const String& domain, const String& name, const String& version);
static void didFireAnimationFrameImpl(const InspectorInstrumentationCookie&);
static void startProfilingImpl(InstrumentingAgents&, JSC::ExecState*, const String& title);
- static RefPtr<JSC::Profile> stopProfilingImpl(InstrumentingAgents&, JSC::ExecState*, const String& title);
+ static void stopProfilingImpl(InstrumentingAgents&, JSC::ExecState*, const String& title);
static void didOpenDatabaseImpl(InstrumentingAgents&, RefPtr<Database>&&, const String& domain, const String& name, const String& version);
#include <inspector/agents/InspectorDebuggerAgent.h>
#include <inspector/agents/InspectorHeapAgent.h>
#include <inspector/agents/InspectorScriptProfilerAgent.h>
-#include <profiler/LegacyProfiler.h>
#include <wtf/Stopwatch.h>
#if PLATFORM(IOS)
return m_environment.executionStopwatch()->elapsedTime();
}
-void InspectorTimelineAgent::startFromConsole(JSC::ExecState* exec, const String &title)
+void InspectorTimelineAgent::startFromConsole(JSC::ExecState*, const String&)
{
// FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler
-
- // Only allow recording of a profile if it is anonymous (empty title) or does not match
- // the title of an already recording profile.
- if (!title.isEmpty()) {
- for (const TimelineRecordEntry& record : m_pendingConsoleProfileRecords) {
- String recordTitle;
- record.data->getString(ASCIILiteral("title"), recordTitle);
- if (recordTitle == title)
- return;
- }
- }
-
- if (!m_enabled && m_pendingConsoleProfileRecords.isEmpty())
- internalStart();
-
- JSC::LegacyProfiler::profiler()->startProfiling(exec, title, m_environment.executionStopwatch());
-
- m_pendingConsoleProfileRecords.append(createRecordEntry(TimelineRecordFactory::createConsoleProfileData(title), TimelineRecordType::ConsoleProfile, true, frameFromExecState(exec)));
}
-RefPtr<JSC::Profile> InspectorTimelineAgent::stopFromConsole(JSC::ExecState* exec, const String& title)
+void InspectorTimelineAgent::stopFromConsole(JSC::ExecState*, const String&)
{
// FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler
-
- // Stop profiles in reverse order. If the title is empty, then stop the last profile.
- // Otherwise, match the title of the profile to stop.
- for (ptrdiff_t i = m_pendingConsoleProfileRecords.size() - 1; i >= 0; --i) {
- const TimelineRecordEntry& record = m_pendingConsoleProfileRecords[i];
-
- String recordTitle;
- record.data->getString(ASCIILiteral("title"), recordTitle);
-
- if (title.isEmpty() || recordTitle == title) {
- RefPtr<JSC::Profile> profile = JSC::LegacyProfiler::profiler()->stopProfiling(exec, title);
- if (profile)
- TimelineRecordFactory::appendProfile(record.data.get(), profile.copyRef());
-
- didCompleteRecordEntry(record);
-
- m_pendingConsoleProfileRecords.remove(i);
-
- if (!m_enabledFromFrontend && m_pendingConsoleProfileRecords.isEmpty())
- internalStop();
-
- return profile;
- }
- }
-
- return nullptr;
}
void InspectorTimelineAgent::willCallFunction(const String& scriptName, int scriptLine, Frame* frame)
#include <inspector/ScriptDebugListener.h>
#include <wtf/Vector.h>
-namespace JSC {
-class Profile;
-}
-
namespace Inspector {
class InspectorHeapAgent;
class InspectorScriptProfilerAgent;
void didCommitLoad();
// Methods called from WebCore.
- void startFromConsole(JSC::ExecState*, const String &title);
- RefPtr<JSC::Profile> stopFromConsole(JSC::ExecState*, const String& title);
+ void startFromConsole(JSC::ExecState*, const String& title);
+ void stopFromConsole(JSC::ExecState*, const String& title);
// InspectorInstrumentation callbacks.
void didInstallTimer(int timerId, std::chrono::milliseconds timeout, bool singleShot, Frame*);
InspectorPageAgent* m_pageAgent;
Vector<TimelineRecordEntry> m_recordStack;
+
int m_id { 1 };
int m_maxCallStackDepth { 5 };
- Vector<TimelineRecordEntry> m_pendingConsoleProfileRecords;
-
bool m_enabled { false };
bool m_enabledFromFrontend { false };
#include <inspector/InjectedScriptManager.h>
#include <inspector/ScriptCallStack.h>
#include <inspector/ScriptCallStackFactory.h>
-#include <profiler/Profile.h>
#include <wtf/NeverDestroyed.h>
using namespace Inspector;
#include "SecurityOrigin.h"
#include <inspector/InjectedScript.h>
#include <inspector/InjectedScriptManager.h>
-#include <profiler/Profile.h>
using Inspector::Protocol::Runtime::ExecutionContextDescription;
+++ /dev/null
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
- NoInterfaceObject,
- SkipVTableValidation,
- ExportMacro=WEBCORE_EXPORT,
-] interface ScriptProfile {
- readonly attribute DOMString title;
- readonly attribute unsigned long uid;
- readonly attribute ScriptProfileNode rootNode;
-};
-
+++ /dev/null
-/*
- * Copyright (C) 2010 Apple Inc. All rights reserved.
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-[
- NoInterfaceObject,
- ImplementationLacksVTable,
- ExportMacro=WEBCORE_EXPORT,
-] interface ScriptProfileNode {
- readonly attribute unsigned long id;
-
- readonly attribute DOMString functionName;
-
- readonly attribute DOMString url;
- readonly attribute unsigned long lineNumber;
- readonly attribute unsigned long columnNumber;
-
- sequence<ScriptProfileNode> children();
-};
#include <inspector/ScriptBreakpoint.h>
#include <inspector/ScriptCallStack.h>
#include <inspector/ScriptCallStackFactory.h>
-#include <profiler/Profile.h>
using namespace Inspector;
data->setArray(ASCIILiteral("root"), createQuad(quad));
}
-static Ref<Protocol::Timeline::CPUProfileNodeAggregateCallInfo> buildAggregateCallInfoInspectorObject(const JSC::ProfileNode* node)
-{
- double startTime = node->calls()[0].startTime();
- double endTime = node->calls().last().startTime() + node->calls().last().elapsedTime();
-
- double totalTime = 0;
- for (const JSC::ProfileNode::Call& call : node->calls())
- totalTime += call.elapsedTime();
-
- return Protocol::Timeline::CPUProfileNodeAggregateCallInfo::create()
- .setCallCount(node->calls().size())
- .setStartTime(startTime)
- .setEndTime(endTime)
- .setTotalTime(totalTime)
- .release();
-}
-
-static Ref<Protocol::Timeline::CPUProfileNode> buildInspectorObject(const JSC::ProfileNode* node)
-{
- auto result = Protocol::Timeline::CPUProfileNode::create()
- .setId(node->id())
- .setCallInfo(buildAggregateCallInfoInspectorObject(node))
- .release();
-
- if (!node->functionName().isEmpty())
- result->setFunctionName(node->functionName());
-
- if (!node->url().isEmpty()) {
- result->setUrl(node->url());
- result->setLineNumber(node->lineNumber());
- result->setColumnNumber(node->columnNumber());
- }
-
- if (!node->children().isEmpty()) {
- auto children = Protocol::Array<Protocol::Timeline::CPUProfileNode>::create();
- for (RefPtr<JSC::ProfileNode> profileNode : node->children())
- children->addItem(buildInspectorObject(profileNode.get()));
- result->setChildren(WTFMove(children));
- }
-
- return result;
-}
-
-static Ref<Protocol::Timeline::CPUProfile> buildProfileInspectorObject(const JSC::Profile* profile)
-{
- auto rootNodes = Protocol::Array<Protocol::Timeline::CPUProfileNode>::create();
- for (RefPtr<JSC::ProfileNode> profileNode : profile->rootNode()->children())
- rootNodes->addItem(buildInspectorObject(profileNode.get()));
-
- return Protocol::Timeline::CPUProfile::create()
- .setRootNodes(WTFMove(rootNodes))
- .release();
-}
-
-void TimelineRecordFactory::appendProfile(InspectorObject* data, RefPtr<JSC::Profile>&& profile)
-{
- data->setValue(ASCIILiteral("profile"), buildProfileInspectorObject(profile.get()));
-}
-
} // namespace WebCore
#include <wtf/Forward.h>
#include <wtf/text/WTFString.h>
-namespace JSC {
-class Profile;
-}
-
namespace Inspector {
struct ScriptBreakpointAction;
}
static Ref<Inspector::InspectorObject> createPaintData(const FloatQuad&);
static void appendLayoutRoot(Inspector::InspectorObject* data, const FloatQuad&);
- static void appendProfile(Inspector::InspectorObject*, RefPtr<JSC::Profile>&&);
private:
TimelineRecordFactory() { }
#include "WebKitPoint.h"
#include "WindowFeatures.h"
#include "WindowFocusAllowedIndicator.h"
-#include <JavaScriptCore/Profile.h>
#include <algorithm>
#include <inspector/ScriptCallStack.h>
#include <inspector/ScriptCallStackFactory.h>
#include "VisitedLinkStore.h"
#include "VoidCallback.h"
#include "Widget.h"
-#include <JavaScriptCore/Profile.h>
#include <wtf/HashMap.h>
#include <wtf/RefCountedLeakCounter.h>
#include <wtf/StdLibExtras.h>
void PageConsoleClient::profileEnd(JSC::ExecState* exec, const String& title)
{
// FIXME: <https://webkit.org/b/153499> Web Inspector: console.profile should use the new Sampling Profiler
- if (RefPtr<JSC::Profile> profile = InspectorInstrumentation::stopProfiling(m_page, exec, title))
- m_profiles.append(WTFMove(profile));
+ InspectorInstrumentation::stopProfiling(m_page, exec, title);
}
void PageConsoleClient::takeHeapSnapshot(JSC::ExecState*, const String& title)
InspectorInstrumentation::consoleTimeStamp(m_page.mainFrame(), WTFMove(arguments));
}
-void PageConsoleClient::clearProfiles()
-{
- m_profiles.clear();
-}
-
} // namespace WebCore
#define PageConsoleClient_h
#include <inspector/ScriptCallStack.h>
-#include <profiler/Profile.h>
#include <runtime/ConsoleClient.h>
#include <wtf/Forward.h>
class Document;
class Page;
-typedef Vector<RefPtr<JSC::Profile>> ProfilesArray;
-
class WEBCORE_EXPORT PageConsoleClient final : public JSC::ConsoleClient {
WTF_MAKE_FAST_ALLOCATED;
public:
void addMessage(MessageSource, MessageLevel, const String& message, RefPtr<Inspector::ScriptCallStack>&&);
void addMessage(MessageSource, MessageLevel, const String& message, unsigned long requestIdentifier = 0, Document* = nullptr);
- const ProfilesArray& profiles() const { return m_profiles; }
- void clearProfiles();
-
protected:
void messageWithTypeAndLevel(MessageType, MessageLevel, JSC::ExecState*, RefPtr<Inspector::ScriptArguments>&&) override;
void count(JSC::ExecState*, RefPtr<Inspector::ScriptArguments>&&) override;
private:
Page& m_page;
- ProfilesArray m_profiles;
};
} // namespace WebCore
#include "WebCoreJSClientData.h"
#include "WorkerThread.h"
#include "XMLHttpRequest.h"
-#include <JavaScriptCore/Profile.h>
#include <bytecode/CodeBlock.h>
#include <inspector/InspectorAgentBase.h>
#include <inspector/InspectorFrontendChannel.h>
WebCore::overrideUserPreferredLanguages(Vector<String>());
WebCore::Settings::setUsesOverlayScrollbars(false);
WebCore::Settings::setUsesMockScrollAnimator(false);
- page.inspectorController().setLegacyProfilerEnabled(false);
#if ENABLE(VIDEO_TRACK)
page.group().captionPreferences().setCaptionsStyleSheetOverride(emptyString());
page.group().captionPreferences().setTestingMode(false);
return document->frame()->editor().countMatchesForText(text, nullptr, findOptions, 1000, mark, nullptr);
}
-const ProfilesArray& Internals::consoleProfiles() const
-{
- return contextDocument()->page()->console().profiles();
-}
-
unsigned Internals::numberOfLiveNodes() const
{
unsigned nodeCount = 0;
m_inspectorFrontend = nullptr;
}
-void Internals::setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode& ec)
-{
- Page* page = contextDocument()->frame()->page();
- if (!page) {
- ec = INVALID_ACCESS_ERR;
- return;
- }
-
- page->inspectorController().setLegacyProfilerEnabled(enabled);
-}
-
void Internals::setInspectorIsUnderTest(bool isUnderTest, ExceptionCode& ec)
{
Page* page = contextDocument()->frame()->page();
void insertAuthorCSS(const String&, ExceptionCode&) const;
void insertUserCSS(const String&, ExceptionCode&) const;
- const ProfilesArray& consoleProfiles() const;
-
unsigned numberOfLiveNodes() const;
unsigned numberOfLiveDocuments() const;
RefPtr<DOMWindow> openDummyInspectorFrontend(const String& url);
void closeDummyInspectorFrontend();
- void setLegacyJavaScriptProfilingEnabled(bool enabled, ExceptionCode&);
void setInspectorIsUnderTest(bool isUnderTest, ExceptionCode&);
String counterValue(Element&);
[RaisesException] void setDeviceProximity(DOMString eventType, unrestricted double value, unrestricted double min, unrestricted double max);
#endif
- // As per spec: http://www.w3.org/TR/WebIDL/#idl-sequence
- // "Sequences must not be used as the type of an attribute, constant or exception field."
- // FIXME: this will lead to BUG internals.consoleProfiles !== internals.consoleProfiles as profile will always returns new array.
- readonly attribute ScriptProfile[] consoleProfiles;
-
unsigned long numberOfLiveNodes();
unsigned long numberOfLiveDocuments();
DOMWindow openDummyInspectorFrontend(DOMString url);
void closeDummyInspectorFrontend();
- [RaisesException] void setLegacyJavaScriptProfilingEnabled(boolean enabled);
[RaisesException] void setInspectorIsUnderTest(boolean isUnderTest);
DOMString counterValue(Element element);
+2016-05-20 Joseph Pecoraro <pecoraro@apple.com>
+
+ Remove LegacyProfiler
+ https://bugs.webkit.org/show_bug.cgi?id=153565
+
+ Reviewed by Saam Barati.
+
+ * Interfaces/IWebInspector.idl:
+ * WebCoreStatistics.cpp:
+ * WebInspector.cpp:
+ (WebInspector::isJavaScriptProfilingEnabled): Deleted.
+ (WebInspector::setJavaScriptProfilingEnabled): Deleted.
+ * WebInspector.h:
+ * WebView.cpp:
+
2016-05-16 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed rollout r200924. Caused js/regress/string-replace-generic.html to fail.
HRESULT isProfilingJavaScript(BOOL* isProfiling);
HRESULT toggleProfilingJavaScript();
- HRESULT isJavaScriptProfilingEnabled(BOOL* isProfilingEnabled);
- HRESULT setJavaScriptProfilingEnabled(BOOL enabled);
-
HRESULT isTimelineProfilingEnabled(BOOL* isEnabled);
HRESULT setTimelineProfilingEnabled(BOOL enabled);
}
#include "COMPropertyBag.h"
#include <JavaScriptCore/JSLock.h>
#include <JavaScriptCore/MemoryStatistics.h>
-#include <JavaScriptCore/Profile.h>
#include <WebCore/DOMWindow.h>
#include <WebCore/FontCache.h>
#include <WebCore/GCController.h>
return S_OK;
}
-HRESULT WebInspector::isJavaScriptProfilingEnabled(_Out_ BOOL* isProfilingEnabled)
-{
- if (!isProfilingEnabled)
- return E_POINTER;
-
- *isProfilingEnabled = FALSE;
-
- if (!m_inspectedWebView)
- return S_OK;
-
- Page* inspectedPage = m_inspectedWebView->page();
- if (!inspectedPage)
- return S_OK;
-
- *isProfilingEnabled = inspectedPage->inspectorController().legacyProfilerEnabled();
- return S_OK;
-}
-
-HRESULT WebInspector::setJavaScriptProfilingEnabled(BOOL enabled)
-{
- if (!m_inspectedWebView)
- return S_OK;
-
- Page* inspectedPage = m_inspectedWebView->page();
- if (!inspectedPage)
- return S_OK;
-
- inspectedPage->inspectorController().setLegacyProfilerEnabled(enabled);
-
- return S_OK;
-}
-
HRESULT WebInspector::evaluateInFrontend(_In_ BSTR bScript)
{
if (!m_inspectedWebView)
virtual HRESULT STDMETHODCALLTYPE isProfilingJavaScript(_Out_ BOOL*);
virtual HRESULT STDMETHODCALLTYPE toggleProfilingJavaScript();
- virtual HRESULT STDMETHODCALLTYPE isJavaScriptProfilingEnabled(_Out_ BOOL*);
- virtual HRESULT STDMETHODCALLTYPE setJavaScriptProfilingEnabled(BOOL);
-
virtual HRESULT STDMETHODCALLTYPE evaluateInFrontend(_In_ BSTR script);
virtual HRESULT STDMETHODCALLTYPE isTimelineProfilingEnabled(_Out_ BOOL*);
#include <JavaScriptCore/InitializeThreading.h>
#include <JavaScriptCore/JSCJSValue.h>
#include <JavaScriptCore/JSLock.h>
-#include <JavaScriptCore/Profile.h>
#include <WebCore/AXObjectCache.h>
#include <WebCore/ApplicationCacheStorage.h>
#include <WebCore/BString.h>
#include <WebCore/HitTestResult.h>
#include <WebCore/IntRect.h>
#include <WebCore/JSElement.h>
-#include <WebCore/JSScriptProfile.h>
#include <WebCore/KeyboardEvent.h>
#include <WebCore/Logging.h>
#include <WebCore/MIMETypeRegistry.h>