⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 185833 in webkit


Ignore:
Timestamp:
Jun 22, 2015, 10:11:54 AM (11 years ago)
Author:
fpizlo@apple.com
Message:

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.
Location:
trunk
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/PerformanceTests/ChangeLog

    r185782 r185833  
     12015-06-19  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Run CDjs as part of JSC stress testing
     4        https://bugs.webkit.org/show_bug.cgi?id=146174
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * 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.
     9        * JetStream/cdjs/main.js: Mark this as a slow test.
     10        * JetStream/create.rb: Don't copy the JSC stress tests artifacts into the JetStream bundle.
     11
    1122015-06-19  Filip Pizlo  <fpizlo@apple.com>
    213
  • trunk/PerformanceTests/JetStream/cdjs/main.js

    r185780 r185833  
    2424// SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2525
     26// This is run as a JSC stress test. Let the harness know that this is a slow test.
     27//@ slow!
     28
    2629load("constants.js");
    2730load("util.js");
  • trunk/PerformanceTests/JetStream/create.rb

    r185780 r185833  
    3030DIRECTORY_NAME = "JetStream-#{VERSION}"
    3131
     32CDJS_FILES = [
     33    "constants.js",
     34    "util.js",
     35    "red_black_tree.js",
     36    "call_sign.js",
     37    "vector_2d.js",
     38    "vector_3d.js",
     39    "motion.js",
     40    "reduce_collision_set.js",
     41    "simulator.js",
     42    "collision.js",
     43    "collision_detector.js",
     44    "benchmark.js"
     45]
     46
    3247raise unless system("rm -rf " + DIRECTORY_NAME)
    3348raise unless system("mkdir -p " + DIRECTORY_NAME)
     
    3550raise unless system("mkdir -p #{DIRECTORY_NAME}/sources")
    3651raise unless system("cp sunspider/*.js #{DIRECTORY_NAME}/sunspider")
    37 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)
     52raise unless system("mkdir -p #{DIRECTORY_NAME}/cdjs")
     53CDJS_FILES.each {
     54    | filename |
     55    raise unless system("cp cdjs/#{filename} #{DIRECTORY_NAME}/cdjs")
     56}
     57raise 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)
    3858
    3959def detemplatize(basename)
     
    117137transferSource("zlib", "Octane2/zlib.js", "Octane2/zlib-data.js")
    118138transferSource("typescript", "Octane2/typescript.js", "Octane2/typescript-compiler.js", "Octane2/typescript-input.js")
    119 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")
     139transferSource("cdjs", *(CDJS_FILES.collect { | filename | "cdjs/#{filename}" }))
    120140
    121141puts "You can now run JetStream by navigating to file://" + (Pathname.new(DIRECTORY_NAME) + "index.html").realpath.to_s
  • trunk/Tools/ChangeLog

    r185816 r185833  
     12015-06-19  Filip Pizlo  <fpizlo@apple.com>
     2
     3        Run CDjs as part of JSC stress testing
     4        https://bugs.webkit.org/show_bug.cgi?id=146174
     5
     6        Reviewed by Geoffrey Garen.
     7
     8        * Scripts/run-javascriptcore-tests:
     9        (runJSCStressTests): Make this aware of the cdjs-tests.yaml.
     10        * Scripts/run-jsc-stress-tests:
     11        - Teach this about tests that indicate error by returning an error code while also having lots of output even when they succeed.
     12        - 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.
     13        - 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.
     14
    1152015-06-21  Alexey Proskuryakov  <ap@apple.com>
    216
  • trunk/Tools/Scripts/run-javascriptcore-tests

    r183974 r185833  
    273273        "-j", jscPath($productDir), "-o", $jscStressResultsDir,
    274274        "PerformanceTests/SunSpider/tests/sunspider-1.0",
     275        "PerformanceTests/JetStream/cdjs/cdjs-tests.yaml",
    275276        "Source/JavaScriptCore/tests/executableAllocationFuzz.yaml",
    276277        "Source/JavaScriptCore/tests/exceptionFuzz.yaml",
  • trunk/Tools/Scripts/run-jsc-stress-tests

    r184683 r185833  
    427427end
    428428
     429# Error handler for tests that fail exactly when they return non-zero exit status and produce
     430# lots of spew. This will echo that spew when the test fails.
     431def noisyErrorHandler
     432    Proc.new {
     433        | outp, plan |
     434        outputFilename = Shellwords.shellescape((Pathname("..") + (plan.name + ".out")).to_s)
     435   
     436        outp.puts "if test -e #{plan.failFile}"
     437        outp.puts "then"
     438        outp.puts "    (cat #{outputFilename} && echo ERROR: Unexpected exit code: `cat #{plan.failFile}`) | " + redirectAndPrefixCommand(plan.name)
     439        outp.puts "    " + plan.failCommand
     440        outp.puts "else"
     441        outp.puts "    " + plan.successCommand
     442        outp.puts "fi"
     443    }
     444end
     445
    429446# Error handler for tests that diff their output with some expectation.
    430447def diffErrorHandler(expectedFilename)
     
    9931010end
    9941011
     1012def runNoisyTest(kind, *options)
     1013    addRunCommand(kind, [pathToVM.to_s] + BASE_OPTIONS + options + [$benchmark.to_s], noisyOutputHandler, noisyErrorHandler)
     1014end
     1015
     1016def runNoisyTestDefault
     1017    runNoisyTest("default")
     1018end
     1019
     1020def runNoisyTestDefaultFTL
     1021    runNoisyTest("ftl", *FTL_OPTIONS) if $enableFTL
     1022end
     1023
     1024def runNoisyTestNoCJIT
     1025    runNoisyTest($enableFTL ? "ftl-no-cjit" : "no-cjit", "--validateBytecode=true", "--validateGraphAtEachPhase=true", *(($enableFTL ? FTL_OPTIONS : []) + NO_CJIT_OPTIONS))
     1026end
     1027
     1028def runNoisyTestEagerNoCJIT
     1029    runNoisyTest($enableFTL ? "ftl-eager-no-cjit" : "eager-no-cjit", "--validateBytecode=true", "--validateGraphAtEachPhase=true", *(($enableFTL ? FTL_OPTIONS : []) + NO_CJIT_OPTIONS + EAGER_OPTIONS))
     1030end
     1031
     1032def defaultRunNoisyTest
     1033    runNoisyTestDefault
     1034    if $jitTests
     1035        runNoisyTestDefaultFTL
     1036        runNoisyTestNoCJIT
     1037        runNoisyTestEagerNoCJIT
     1038    end
     1039end
     1040
    9951041def skip
    9961042    $didAddRunCommand = true
     
    10571103        if bundleDir.basename == $collection.basename
    10581104            FileUtils.cp_r absoluteCollection, bundleDir.dirname
     1105            $collection = bundleDir
    10591106        else
    10601107            FileUtils.cp_r absoluteCollection, bundleDir
    1061         end
    1062 
    1063         $extraFilesBaseDir = absoluteCollection
    1064 
    1065         # Redirect the collection's location to the newly constructed bundle.
    1066         if absoluteCollection.directory?
    1067             $collection = bundleDir
    1068         else
    10691108            $collection = bundleDir + $collection.basename
    10701109        end
     1110
     1111        $extraFilesBaseDir = absoluteCollection
    10711112    }
    10721113end
     
    11141155     
    11151156        Dir.chdir($outputDir) {
    1116             directoryToSearch = $collection
     1157            pathsToSearch = [$collection]
    11171158            if entry["tests"]
    1118                 directoryToSearch += entry["tests"]
     1159                if entry["tests"].is_a? Array
     1160                    pathsToSearch = entry["tests"].map {
     1161                        | testName |
     1162                        pathsToSearch[0] + testName
     1163                    }
     1164                else
     1165                    pathsToSearch[0] += entry["tests"]
     1166                end
    11191167            end
    1120             allJSFiles(directoryToSearch).each {
    1121                 | path |
    1122                
    1123                 $benchmark = path.basename
    1124                 $benchmarkDirectory = path.dirname
    1125                
    1126                 $runCommandOptions = {}
    1127                 eval entry["cmd"]
     1168            pathsToSearch.each {
     1169                | pathToSearch |
     1170                allJSFiles(pathToSearch).each {
     1171                    | path |
     1172                   
     1173                    $benchmark = path.basename
     1174                    $benchmarkDirectory = path.dirname
     1175                   
     1176                    $runCommandOptions = {}
     1177                    eval entry["cmd"]
     1178                }
    11281179            }
    11291180        }
Note: See TracChangeset for help on using the changeset viewer.