Title: [201947] trunk
Revision
201947
Author
[email protected]
Date
2016-06-10 15:55:01 -0700 (Fri, 10 Jun 2016)

Log Message

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.
        
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-_javascript_core-tests:
(runJSCStressTests):

Modified Paths

Added Paths

Diff

Modified: trunk/PerformanceTests/ChangeLog (201946 => 201947)


--- trunk/PerformanceTests/ChangeLog	2016-06-10 22:26:34 UTC (rev 201946)
+++ trunk/PerformanceTests/ChangeLog	2016-06-10 22:55:01 UTC (rev 201947)
@@ -1,3 +1,27 @@
+2016-06-10  Filip Pizlo  <[email protected]>
+
+        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  <[email protected]>
 
         Unreviewed, teach the perf bots not to run JSAir.

Modified: trunk/PerformanceTests/JSAir/benchmark.js (201946 => 201947)


--- trunk/PerformanceTests/JSAir/benchmark.js	2016-06-10 22:26:34 UTC (rev 201946)
+++ trunk/PerformanceTests/JSAir/benchmark.js	2016-06-10 22:55:01 UTC (rev 201947)
@@ -24,28 +24,28 @@
  */
 "use strict";
 
-function benchmark()
-{
-    const verbose = 0;
-    const numIterations = 150;
+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}
+        ];
+    }
     
-    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}
-    ];
-    
-    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 @@
             
             allocateStack(code);
             
-            if (verbose) {
+            if (this._verbose) {
                 print("After allocateStack:");
                 print(code);
             }
@@ -66,7 +66,20 @@
                 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;
 }

Modified: trunk/PerformanceTests/JSAir/jsair-tests.yaml (201946 => 201947)


--- trunk/PerformanceTests/JSAir/jsair-tests.yaml	2016-06-10 22:26:34 UTC (rev 201946)
+++ trunk/PerformanceTests/JSAir/jsair-tests.yaml	2016-06-10 22:55:01 UTC (rev 201947)
@@ -23,6 +23,6 @@
 
 - path: .
   tests:
-    - test.js
+    - stress-test.js
   cmd: defaultRunNoisyTest unless parseRunCommands
 

Added: trunk/PerformanceTests/JSAir/stress-test.js (0 => 201947)


--- trunk/PerformanceTests/JSAir/stress-test.js	                        (rev 0)
+++ trunk/PerformanceTests/JSAir/stress-test.js	2016-06-10 22:55:01 UTC (rev 201947)
@@ -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!");
+
+
+

Modified: trunk/PerformanceTests/JSAir/test.html (201946 => 201947)


--- trunk/PerformanceTests/JSAir/test.html	2016-06-10 22:26:34 UTC (rev 201946)
+++ trunk/PerformanceTests/JSAir/test.html	2016-06-10 22:55:01 UTC (rev 201947)
@@ -24,7 +24,7 @@
 <script src=""
 <script>
     function runTest() {
-        var result = benchmark();
+        var result = runBenchmark();
         document.getElementById("result-summary").innerHTML = "That took " + result + " ms.";
     }
 </script>

Modified: trunk/PerformanceTests/JSAir/test.js (201946 => 201947)


--- trunk/PerformanceTests/JSAir/test.js	2016-06-10 22:26:34 UTC (rev 201946)
+++ trunk/PerformanceTests/JSAir/test.js	2016-06-10 22:55:01 UTC (rev 201947)
@@ -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-typescript-scanIdentifier.js");
 load("benchmark.js");
 
-let result = benchmark();
+let result = runBenchmark();
 print("That took " + result + " ms.");

Modified: trunk/Tools/ChangeLog (201946 => 201947)


--- trunk/Tools/ChangeLog	2016-06-10 22:26:34 UTC (rev 201946)
+++ trunk/Tools/ChangeLog	2016-06-10 22:55:01 UTC (rev 201947)
@@ -1,3 +1,15 @@
+2016-06-10  Filip Pizlo  <[email protected]>
+
+        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-_javascript_core-tests:
+        (runJSCStressTests):
+
 2016-06-10  Sam Weinig  <[email protected]>
 
         Re-disable the UserMedia tests which are timing out.

Modified: trunk/Tools/Scripts/run-_javascript_core-tests (201946 => 201947)


--- trunk/Tools/Scripts/run-_javascript_core-tests	2016-06-10 22:26:34 UTC (rev 201946)
+++ trunk/Tools/Scripts/run-_javascript_core-tests	2016-06-10 22:55:01 UTC (rev 201947)
@@ -234,8 +234,7 @@
         @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/_javascript_Core/tests/executableAllocationFuzz.yaml",
             "Source/_javascript_Core/tests/exceptionFuzz.yaml",
             "PerformanceTests/SunSpider/no-architecture-specific-optimizations.yaml",
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to