JSC Stress Test failing: jsair-tests.yaml/test.js.ftl-eager-no-cjit
authorfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jun 2016 22:55:01 +0000 (22:55 +0000)
committerfpizlo@apple.com <fpizlo@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 10 Jun 2016 22:55:01 +0000 (22:55 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158571

Reviewed by Keith Miller.

PerformanceTests:

Introduce a different harness for run-jsc-stress-tests, which runs for a minimum of 10
iterations and then tries to do any number of "bonus" iterations until it's been running for
two seconds. Since this is the sort of test that isn't really meant to stress anything in
particular, I think it's OK if it is time-limited in this way. The worst case is that some
of its failures will be flaky, but I think that they would have been flaky anyway given the
complexity of the test.

* JSAir/benchmark.js:
(Benchmark):
(Benchmark.prototype.runIteration):
(benchmark): Deleted.
* JSAir/jsair-tests.yaml:
* JSAir/stress-test.js: Added.
(preciseTime):
* JSAir/test.html:
* JSAir/test.js:

Tools:

Unskip the JSAir test.

* Scripts/run-javascriptcore-tests:
(runJSCStressTests):

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

PerformanceTests/ChangeLog
PerformanceTests/JSAir/benchmark.js
PerformanceTests/JSAir/jsair-tests.yaml
PerformanceTests/JSAir/stress-test.js [new file with mode: 0644]
PerformanceTests/JSAir/test.html
PerformanceTests/JSAir/test.js
Tools/ChangeLog
Tools/Scripts/run-javascriptcore-tests

index 0ad8f8993a9605213502d51e3b87ffa007ebf3fb..857656b593efdcb483c71b7b2c97ca6bb5c7a50a 100644 (file)
@@ -1,3 +1,27 @@
+2016-06-10  Filip Pizlo  <fpizlo@apple.com>
+
+        JSC Stress Test failing: jsair-tests.yaml/test.js.ftl-eager-no-cjit
+        https://bugs.webkit.org/show_bug.cgi?id=158571
+
+        Reviewed by Keith Miller.
+        
+        Introduce a different harness for run-jsc-stress-tests, which runs for a minimum of 10
+        iterations and then tries to do any number of "bonus" iterations until it's been running for
+        two seconds. Since this is the sort of test that isn't really meant to stress anything in
+        particular, I think it's OK if it is time-limited in this way. The worst case is that some
+        of its failures will be flaky, but I think that they would have been flaky anyway given the
+        complexity of the test.
+
+        * JSAir/benchmark.js:
+        (Benchmark):
+        (Benchmark.prototype.runIteration):
+        (benchmark): Deleted.
+        * JSAir/jsair-tests.yaml:
+        * JSAir/stress-test.js: Added.
+        (preciseTime):
+        * JSAir/test.html:
+        * JSAir/test.js:
+
 2016-06-09  Filip Pizlo  <fpizlo@apple.com>
 
         Unreviewed, teach the perf bots not to run JSAir.
index 668227fe9bddb21ea7bac56796375f60603bf9d2..ec3da5ad4ff2ebc06b2f02a7398e1fe7ddf56aa9 100644 (file)
  */
 "use strict";
 
-function benchmark()
-{
-    const verbose = 0;
-    const numIterations = 150;
-    
-    let before = currentTime();
-    
-    var payloads = [
-        {generate: createPayloadGbemuExecuteIteration, earlyHash: 632653144, lateHash: 372715518},
-        {generate: createPayloadImagingGaussianBlurGaussianBlur, earlyHash: 3677819581, lateHash: 1252116304},
-        {generate: createPayloadTypescriptScanIdentifier, earlyHash: 1914852601, lateHash: 837339551},
-        {generate: createPayloadJSAirACLj8C, earlyHash: 1373599940, lateHash: 3981283600}
-    ];
+class Benchmark {
+    constructor(verbose = 0)
+    {
+        this._verbose = verbose;
+        
+        this._payloads = [
+            {generate: createPayloadGbemuExecuteIteration, earlyHash: 632653144, lateHash: 372715518},
+            {generate: createPayloadImagingGaussianBlurGaussianBlur, earlyHash: 3677819581, lateHash: 1252116304},
+            {generate: createPayloadTypescriptScanIdentifier, earlyHash: 1914852601, lateHash: 837339551},
+            {generate: createPayloadJSAirACLj8C, earlyHash: 1373599940, lateHash: 3981283600}
+        ];
+    }
     
-    for (let iteration = 0; iteration < numIterations; ++iteration) {
-        for (let payload of payloads) {
+    runIteration()
+    {
+        for (let payload of this._payloads) {
             // Sadly about 17% of our time is in generate. I don't think that's really avoidable,
             // and I don't mind testing VMs' ability to run such "data definition" code quickly. I
             // would not have expected it to be so slow from first principles!
             let code = payload.generate();
             
-            if (verbose) {
+            if (this._verbose) {
                 print("Before allocateStack:");
                 print(code);
             }
@@ -56,7 +56,7 @@ function benchmark()
             
             allocateStack(code);
             
-            if (verbose) {
+            if (this._verbose) {
                 print("After allocateStack:");
                 print(code);
             }
@@ -66,6 +66,19 @@ function benchmark()
                 throw new Error(`Wrong late hash for ${payload.generate.name}: ${hash}`);
         }
     }
+}
+
+function runBenchmark()
+{
+    const verbose = 0;
+    const numIterations = 150;
+    
+    let before = currentTime();
+    
+    let benchmark = new Benchmark(verbose);
+    
+    for (let iteration = 0; iteration < numIterations; ++iteration)
+        benchmark.runIteration();
     
     let after = currentTime();
     return after - before;
index f815412ad555cc6908a35f382c17aca9ba7e8eef..6d55fbe63a0b1bd2b2ad1d67fbd30ddb838b65bb 100644 (file)
@@ -23,6 +23,6 @@
 
 - path: .
   tests:
-    - test.js
+    - stress-test.js
   cmd: defaultRunNoisyTest unless parseRunCommands
 
diff --git a/PerformanceTests/JSAir/stress-test.js b/PerformanceTests/JSAir/stress-test.js
new file mode 100644 (file)
index 0000000..cc7a410
--- /dev/null
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2016 Apple 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. 
+ */
+"use strict";
+
+load("all.js");
+load("payload-gbemu-executeIteration.js");
+load("payload-imaging-gaussian-blur-gaussianBlur.js");
+load("payload-jsair-ACLj8C.js");
+load("payload-typescript-scanIdentifier.js");
+load("benchmark.js");
+
+let benchmark = new Benchmark();
+let before = preciseTime();
+
+// Run for at least 10 iterations.
+for (let i = 0; i < 10; ++i) {
+    print("Running mandatory iteration #" + (i + 1) + ":");
+    benchmark.runIteration();
+}
+
+// Run until we have been running for two seconds.
+while (preciseTime() < before + 2) {
+    print("Running bonus iteration:");
+    benchmark.runIteration();
+}
+
+print("Success!");
+
+
+
index ae04302e3553446e97db629d483b483449fe9597..20da320eeca1407286dff38c9f2950b7cd3f0ab1 100644 (file)
@@ -24,7 +24,7 @@
 <script src="benchmark.js"></script>
 <script>
     function runTest() {
-        var result = benchmark();
+        var result = runBenchmark();
         document.getElementById("result-summary").innerHTML = "That took " + result + " ms.";
     }
 </script>
index cb2d91d6d31fde132d367655f5bb7ad0fd44ae2e..c5aa2078c5dddd592a89f26bbb008b79accab568 100644 (file)
@@ -1,3 +1,27 @@
+/*
+ * Copyright (C) 2016 Apple 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. 
+ */
 "use strict";
 
 load("all.js");
@@ -7,5 +31,5 @@ load("payload-jsair-ACLj8C.js");
 load("payload-typescript-scanIdentifier.js");
 load("benchmark.js");
 
-let result = benchmark();
+let result = runBenchmark();
 print("That took " + result + " ms.");
index 444c19a83bee35c0a690a71d9b17d280e0ae4e2f..7a822573ac3214d35097c08f7837b4cd85cdb701 100644 (file)
@@ -1,3 +1,15 @@
+2016-06-10  Filip Pizlo  <fpizlo@apple.com>
+
+        JSC Stress Test failing: jsair-tests.yaml/test.js.ftl-eager-no-cjit
+        https://bugs.webkit.org/show_bug.cgi?id=158571
+
+        Reviewed by Keith Miller.
+        
+        Unskip the JSAir test.
+
+        * Scripts/run-javascriptcore-tests:
+        (runJSCStressTests):
+
 2016-06-10  Sam Weinig  <sam@webkit.org>
 
         Re-disable the UserMedia tests which are timing out.
index 13ae3f1fa0e2e86efd28b7070c610c21502b8597..a736f4a28373eb89675a68459dc13425c2d0b36e 100755 (executable)
@@ -234,8 +234,7 @@ sub runJSCStressTests
         @testList = (
             "PerformanceTests/SunSpider/tests/sunspider-1.0",
             "PerformanceTests/JetStream/cdjs/cdjs-tests.yaml",
-            # Skip this while we figure out how to handle timeouts in debug.
-            # "PerformanceTests/JSAir/jsair-tests.yaml",
+            "PerformanceTests/JSAir/jsair-tests.yaml",
             "Source/JavaScriptCore/tests/executableAllocationFuzz.yaml",
             "Source/JavaScriptCore/tests/exceptionFuzz.yaml",
             "PerformanceTests/SunSpider/no-architecture-specific-optimizations.yaml",