<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[185833] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/185833">185833</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2015-06-22 10:11:54 -0700 (Mon, 22 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Run CDjs as part of JSC stress testing
https://bugs.webkit.org/show_bug.cgi?id=146174
Reviewed by Geoffrey Garen.
PerformanceTests:
* JetStream/cdjs/cdjs-tests.yaml: Added. This tells JSC stress tests what tests to run. It uses new syntax ("tests" being a list) that I add in this change.
* JetStream/cdjs/main.js: Mark this as a slow test.
* JetStream/create.rb: Don't copy the JSC stress tests artifacts into the JetStream bundle.
Tools:
* Scripts/run-javascriptcore-tests:
(runJSCStressTests): Make this aware of the cdjs-tests.yaml.
* Scripts/run-jsc-stress-tests:
- Teach this about tests that indicate error by returning an error code while also having lots of output even when they succeed.
- Add the ability to have "tests" be a list of tests rather than just one test. This could also be a list of directories that have tests.
- Fix a bug with bundle copying: whether the $collection should have the basename appended depends on whether we copy into bundleDir.dirname, not on whether absoluteCollection is a directory.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsChangeLog">trunk/PerformanceTests/ChangeLog</a></li>
<li><a href="#trunkPerformanceTestsJetStreamcdjsmainjs">trunk/PerformanceTests/JetStream/cdjs/main.js</a></li>
<li><a href="#trunkPerformanceTestsJetStreamcreaterb">trunk/PerformanceTests/JetStream/create.rb</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptsrunjavascriptcoretests">trunk/Tools/Scripts/run-javascriptcore-tests</a></li>
<li><a href="#trunkToolsScriptsrunjscstresstests">trunk/Tools/Scripts/run-jsc-stress-tests</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsJetStreamcdjscdjstestsyaml">trunk/PerformanceTests/JetStream/cdjs/cdjs-tests.yaml</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ChangeLog (185832 => 185833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ChangeLog        2015-06-22 17:04:08 UTC (rev 185832)
+++ trunk/PerformanceTests/ChangeLog        2015-06-22 17:11:54 UTC (rev 185833)
</span><span class="lines">@@ -1,5 +1,16 @@
</span><span class="cx"> 2015-06-19 Filip Pizlo <fpizlo@apple.com>
</span><span class="cx">
</span><ins>+ Run CDjs as part of JSC stress testing
+ https://bugs.webkit.org/show_bug.cgi?id=146174
+
+ Reviewed by Geoffrey Garen.
+
+ * JetStream/cdjs/cdjs-tests.yaml: Added. This tells JSC stress tests what tests to run. It uses new syntax ("tests" being a list) that I add in this change.
+ * JetStream/cdjs/main.js: Mark this as a slow test.
+ * JetStream/create.rb: Don't copy the JSC stress tests artifacts into the JetStream bundle.
+
+2015-06-19 Filip Pizlo <fpizlo@apple.com>
+
</ins><span class="cx"> Unreviewed, fix a small indentation goof.
</span><span class="cx">
</span><span class="cx"> * JetStream/cdjs/motion.js:
</span></span></pre></div>
<a id="trunkPerformanceTestsJetStreamcdjscdjstestsyaml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/JetStream/cdjs/cdjs-tests.yaml (0 => 185833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/JetStream/cdjs/cdjs-tests.yaml         (rev 0)
+++ trunk/PerformanceTests/JetStream/cdjs/cdjs-tests.yaml        2015-06-22 17:11:54 UTC (rev 185833)
</span><span class="lines">@@ -0,0 +1,31 @@
</span><ins>+# Copyright (C) 2015 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 AND ITS CONTRIBUTORS "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 OR ITS 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.
+
+- path: .
+ tests:
+ - red_black_tree_test.js
+ - motion_test.js
+ - reduce_collision_set_test.js
+ - main.js
+ cmd: defaultRunNoisyTest unless parseRunCommands
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsJetStreamcdjsmainjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/JetStream/cdjs/main.js (185832 => 185833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/JetStream/cdjs/main.js        2015-06-22 17:04:08 UTC (rev 185832)
+++ trunk/PerformanceTests/JetStream/cdjs/main.js        2015-06-22 17:11:54 UTC (rev 185833)
</span><span class="lines">@@ -23,6 +23,9 @@
</span><span class="cx"> // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
</span><span class="cx"> // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
</span><span class="cx">
</span><ins>+// This is run as a JSC stress test. Let the harness know that this is a slow test.
+//@ slow!
+
</ins><span class="cx"> load("constants.js");
</span><span class="cx"> load("util.js");
</span><span class="cx"> load("red_black_tree.js");
</span></span></pre></div>
<a id="trunkPerformanceTestsJetStreamcreaterb"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/JetStream/create.rb (185832 => 185833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/JetStream/create.rb        2015-06-22 17:04:08 UTC (rev 185832)
+++ trunk/PerformanceTests/JetStream/create.rb        2015-06-22 17:11:54 UTC (rev 185833)
</span><span class="lines">@@ -29,12 +29,32 @@
</span><span class="cx"> VERSION = "1.1-alpha2"
</span><span class="cx"> DIRECTORY_NAME = "JetStream-#{VERSION}"
</span><span class="cx">
</span><ins>+CDJS_FILES = [
+ "constants.js",
+ "util.js",
+ "red_black_tree.js",
+ "call_sign.js",
+ "vector_2d.js",
+ "vector_3d.js",
+ "motion.js",
+ "reduce_collision_set.js",
+ "simulator.js",
+ "collision.js",
+ "collision_detector.js",
+ "benchmark.js"
+]
+
</ins><span class="cx"> raise unless system("rm -rf " + DIRECTORY_NAME)
</span><span class="cx"> raise unless system("mkdir -p " + DIRECTORY_NAME)
</span><span class="cx"> raise unless system("mkdir -p #{DIRECTORY_NAME}/sunspider")
</span><span class="cx"> raise unless system("mkdir -p #{DIRECTORY_NAME}/sources")
</span><span class="cx"> raise unless system("cp sunspider/*.js #{DIRECTORY_NAME}/sunspider")
</span><del>-raise unless system("cp -r JetStream.css JetStreamDriver.js LLVM-test-suite-LICENSE.txt simple Octane2 Octane2Setup.js SimpleSetup.js SunSpiderSetup.js Octane OctaneSetup.js CDjsSetup.js cdjs Reference.js TestingSetup.js JetStream-Logo.png JetStream-Logo@2x.png Swoosh.png Swoosh@2x.png " + DIRECTORY_NAME)
</del><ins>+raise unless system("mkdir -p #{DIRECTORY_NAME}/cdjs")
+CDJS_FILES.each {
+ | filename |
+ raise unless system("cp cdjs/#{filename} #{DIRECTORY_NAME}/cdjs")
+}
+raise unless system("cp -r JetStream.css JetStreamDriver.js LLVM-test-suite-LICENSE.txt simple Octane2 Octane2Setup.js SimpleSetup.js SunSpiderSetup.js Octane OctaneSetup.js CDjsSetup.js Reference.js TestingSetup.js JetStream-Logo.png JetStream-Logo@2x.png Swoosh.png Swoosh@2x.png " + DIRECTORY_NAME)
</ins><span class="cx">
</span><span class="cx"> def detemplatize(basename)
</span><span class="cx"> File.open(DIRECTORY_NAME + "/#{basename}.html", "w") {
</span><span class="lines">@@ -116,7 +136,7 @@
</span><span class="cx"> transferSource("box2d", "Octane2/box2d.js")
</span><span class="cx"> transferSource("zlib", "Octane2/zlib.js", "Octane2/zlib-data.js")
</span><span class="cx"> transferSource("typescript", "Octane2/typescript.js", "Octane2/typescript-compiler.js", "Octane2/typescript-input.js")
</span><del>-transferSource("cdjs", "cdjs/constants.js", "cdjs/util.js", "cdjs/red_black_tree.js", "cdjs/call_sign.js", "cdjs/vector_2d.js", "cdjs/vector_3d.js", "cdjs/motion.js", "cdjs/reduce_collision_set.js", "cdjs/simulator.js", "cdjs/collision.js", "cdjs/collision_detector.js", "cdjs/benchmark.js")
</del><ins>+transferSource("cdjs", *(CDJS_FILES.collect { | filename | "cdjs/#{filename}" }))
</ins><span class="cx">
</span><span class="cx"> puts "You can now run JetStream by navigating to file://" + (Pathname.new(DIRECTORY_NAME) + "index.html").realpath.to_s
</span><span class="cx">
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (185832 => 185833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2015-06-22 17:04:08 UTC (rev 185832)
+++ trunk/Tools/ChangeLog        2015-06-22 17:11:54 UTC (rev 185833)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2015-06-19 Filip Pizlo <fpizlo@apple.com>
+
+ Run CDjs as part of JSC stress testing
+ https://bugs.webkit.org/show_bug.cgi?id=146174
+
+ Reviewed by Geoffrey Garen.
+
+ * Scripts/run-javascriptcore-tests:
+ (runJSCStressTests): Make this aware of the cdjs-tests.yaml.
+ * Scripts/run-jsc-stress-tests:
+ - Teach this about tests that indicate error by returning an error code while also having lots of output even when they succeed.
+ - Add the ability to have "tests" be a list of tests rather than just one test. This could also be a list of directories that have tests.
+ - Fix a bug with bundle copying: whether the $collection should have the basename appended depends on whether we copy into bundleDir.dirname, not on whether absoluteCollection is a directory.
+
</ins><span class="cx"> 2015-06-21 Alexey Proskuryakov <ap@apple.com>
</span><span class="cx">
</span><span class="cx"> REGRESSION (r172975): navigator.language unable to tell region for Traditional Chinese users
</span></span></pre></div>
<a id="trunkToolsScriptsrunjavascriptcoretests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-javascriptcore-tests (185832 => 185833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-javascriptcore-tests        2015-06-22 17:04:08 UTC (rev 185832)
+++ trunk/Tools/Scripts/run-javascriptcore-tests        2015-06-22 17:11:54 UTC (rev 185833)
</span><span class="lines">@@ -272,6 +272,7 @@
</span><span class="cx"> "/usr/bin/env", "ruby", "Tools/Scripts/run-jsc-stress-tests",
</span><span class="cx"> "-j", jscPath($productDir), "-o", $jscStressResultsDir,
</span><span class="cx"> "PerformanceTests/SunSpider/tests/sunspider-1.0",
</span><ins>+ "PerformanceTests/JetStream/cdjs/cdjs-tests.yaml",
</ins><span class="cx"> "Source/JavaScriptCore/tests/executableAllocationFuzz.yaml",
</span><span class="cx"> "Source/JavaScriptCore/tests/exceptionFuzz.yaml",
</span><span class="cx"> "PerformanceTests/SunSpider/no-architecture-specific-optimizations.yaml",
</span></span></pre></div>
<a id="trunkToolsScriptsrunjscstresstests"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/run-jsc-stress-tests (185832 => 185833)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/run-jsc-stress-tests        2015-06-22 17:04:08 UTC (rev 185832)
+++ trunk/Tools/Scripts/run-jsc-stress-tests        2015-06-22 17:11:54 UTC (rev 185833)
</span><span class="lines">@@ -426,6 +426,23 @@
</span><span class="cx"> }
</span><span class="cx"> end
</span><span class="cx">
</span><ins>+# Error handler for tests that fail exactly when they return non-zero exit status and produce
+# lots of spew. This will echo that spew when the test fails.
+def noisyErrorHandler
+ Proc.new {
+ | outp, plan |
+ outputFilename = Shellwords.shellescape((Pathname("..") + (plan.name + ".out")).to_s)
+
+ outp.puts "if test -e #{plan.failFile}"
+ outp.puts "then"
+ outp.puts " (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + redirectAndPrefixCommand(plan.name)
+ outp.puts " " + plan.failCommand
+ outp.puts "else"
+ outp.puts " " + plan.successCommand
+ outp.puts "fi"
+ }
+end
+
</ins><span class="cx"> # Error handler for tests that diff their output with some expectation.
</span><span class="cx"> def diffErrorHandler(expectedFilename)
</span><span class="cx"> Proc.new {
</span><span class="lines">@@ -992,6 +1009,35 @@
</span><span class="cx"> end
</span><span class="cx"> end
</span><span class="cx">
</span><ins>+def runNoisyTest(kind, *options)
+ addRunCommand(kind, [pathToVM.to_s] + BASE_OPTIONS + options + [$benchmark.to_s], noisyOutputHandler, noisyErrorHandler)
+end
+
+def runNoisyTestDefault
+ runNoisyTest("default")
+end
+
+def runNoisyTestDefaultFTL
+ runNoisyTest("ftl", *FTL_OPTIONS) if $enableFTL
+end
+
+def runNoisyTestNoCJIT
+ runNoisyTest($enableFTL ? "ftl-no-cjit" : "no-cjit", "--validateBytecode=true", "--validateGraphAtEachPhase=true", *(($enableFTL ? FTL_OPTIONS : []) + NO_CJIT_OPTIONS))
+end
+
+def runNoisyTestEagerNoCJIT
+ runNoisyTest($enableFTL ? "ftl-eager-no-cjit" : "eager-no-cjit", "--validateBytecode=true", "--validateGraphAtEachPhase=true", *(($enableFTL ? FTL_OPTIONS : []) + NO_CJIT_OPTIONS + EAGER_OPTIONS))
+end
+
+def defaultRunNoisyTest
+ runNoisyTestDefault
+ if $jitTests
+ runNoisyTestDefaultFTL
+ runNoisyTestNoCJIT
+ runNoisyTestEagerNoCJIT
+ end
+end
+
</ins><span class="cx"> def skip
</span><span class="cx"> $didAddRunCommand = true
</span><span class="cx"> puts "Skipping #{$collectionName}/#{$benchmark}"
</span><span class="lines">@@ -1056,18 +1102,13 @@
</span><span class="cx"> FileUtils.mkdir_p bundleDir
</span><span class="cx"> if bundleDir.basename == $collection.basename
</span><span class="cx"> FileUtils.cp_r absoluteCollection, bundleDir.dirname
</span><ins>+ $collection = bundleDir
</ins><span class="cx"> else
</span><span class="cx"> FileUtils.cp_r absoluteCollection, bundleDir
</span><ins>+ $collection = bundleDir + $collection.basename
</ins><span class="cx"> end
</span><span class="cx">
</span><span class="cx"> $extraFilesBaseDir = absoluteCollection
</span><del>-
- # Redirect the collection's location to the newly constructed bundle.
- if absoluteCollection.directory?
- $collection = bundleDir
- else
- $collection = bundleDir + $collection.basename
- end
</del><span class="cx"> }
</span><span class="cx"> end
</span><span class="cx">
</span><span class="lines">@@ -1113,18 +1154,28 @@
</span><span class="cx"> prepareCollection($collectionName)
</span><span class="cx">
</span><span class="cx"> Dir.chdir($outputDir) {
</span><del>- directoryToSearch = $collection
</del><ins>+ pathsToSearch = [$collection]
</ins><span class="cx"> if entry["tests"]
</span><del>- directoryToSearch += entry["tests"]
</del><ins>+ if entry["tests"].is_a? Array
+ pathsToSearch = entry["tests"].map {
+ | testName |
+ pathsToSearch[0] + testName
+ }
+ else
+ pathsToSearch[0] += entry["tests"]
+ end
</ins><span class="cx"> end
</span><del>- allJSFiles(directoryToSearch).each {
- | path |
-
- $benchmark = path.basename
- $benchmarkDirectory = path.dirname
-
- $runCommandOptions = {}
- eval entry["cmd"]
</del><ins>+ pathsToSearch.each {
+ | pathToSearch |
+ allJSFiles(pathToSearch).each {
+ | path |
+
+ $benchmark = path.basename
+ $benchmarkDirectory = path.dirname
+
+ $runCommandOptions = {}
+ eval entry["cmd"]
+ }
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span></span></pre>
</div>
</div>
</body>
</html>