8029780: "ant externals" broke our test harness with the latest version of the octane benchmarks

Wed, 11 Dec 2013 18:09:34 +0100

author
lagergren
date
Wed, 11 Dec 2013 18:09:34 +0100
changeset 693
18edd7a1b166
parent 692
4706897b4dec
child 694
e452a3797290

8029780: "ant externals" broke our test harness with the latest version of the octane benchmarks
Reviewed-by: attila, sundar

make/build-benchmark.xml file | annotate | diff | comparison | revisions
test/script/basic/compile-octane-splitter.js.EXPECTED file | annotate | diff | comparison | revisions
test/script/basic/compile-octane.js.EXPECTED file | annotate | diff | comparison | revisions
test/script/basic/run-octane.js file | annotate | diff | comparison | revisions
     1.1 --- a/make/build-benchmark.xml	Mon Dec 09 10:52:05 2013 +0100
     1.2 +++ b/make/build-benchmark.xml	Wed Dec 11 18:09:34 2013 +0100
     1.3 @@ -239,7 +239,7 @@
     1.4      </antcall>
     1.5    </target>
     1.6  
     1.7 -  <target name="octane-regexp-octane-v8" depends="jar">
     1.8 +  <target name="octane-regexp-v8" depends="jar">
     1.9      <antcall target="run-octane-v8">
    1.10        <param name="octane-tests" value="regexp"/>
    1.11      </antcall>
    1.12 @@ -291,17 +291,56 @@
    1.13      </antcall>
    1.14    </target>
    1.15  
    1.16 +  <!-- splay -->
    1.17 +  <target name="octane-typescript" depends="jar">
    1.18 +    <antcall target="run-octane">
    1.19 +      <param name="octane-tests" value="typescript"/>
    1.20 +    </antcall>
    1.21 +  </target>
    1.22 +
    1.23 +  <target name="octane-typescript-v8" depends="jar">
    1.24 +    <antcall target="run-octane-v8">
    1.25 +      <param name="octane-typescript" value="typescript"/>
    1.26 +    </antcall>
    1.27 +  </target>
    1.28 +
    1.29 +  <target name="octane-typescript-rhino" depends="jar">
    1.30 +    <antcall target="run-octane-rhino">
    1.31 +      <param name="octane-tests" value="typescript"/>
    1.32 +    </antcall>
    1.33 +  </target>
    1.34 +
    1.35 +  <!-- zlib -->
    1.36 +  <target name="octane-zlib" depends="jar">
    1.37 +    <antcall target="run-octane">
    1.38 +      <param name="octane-tests" value="zlib"/>
    1.39 +    </antcall>
    1.40 +  </target>
    1.41 +
    1.42 +  <target name="octane-zlib-v8" depends="jar">
    1.43 +    <antcall target="run-octane-v8">
    1.44 +      <param name="octane-typescript" value="zlib"/>
    1.45 +    </antcall>
    1.46 +  </target>
    1.47 +
    1.48 +  <target name="octane-zlib-rhino" depends="jar">
    1.49 +    <antcall target="run-octane-rhino">
    1.50 +      <param name="octane-tests" value="zlib"/>
    1.51 +    </antcall>
    1.52 +  </target>
    1.53 +
    1.54    <!-- run octane benchmarks in a single process  -->
    1.55    <target name="octane-single-process" depends="octane-init">
    1.56      <antcall target="run-octane"/>
    1.57    </target>
    1.58  
    1.59 -  <!-- mandreel excluded due to OOM -->
    1.60 +  <!-- zlib excluded due to missing implementation of 'read' -->
    1.61    <target name="octane-separate-process" depends=
    1.62       "octane-box2d, octane-code-load, octane-crypto, 
    1.63        octane-deltablue, octane-earley-boyer, octane-gbemu,
    1.64 -      octane-navier-stokes, octane-pdfjs, octane-raytrace, 
    1.65 -      octane-regexp, octane-richards, octane-splay"/>
    1.66 +      octane-mandreel, octane-navier-stokes, octane-pdfjs, 
    1.67 +      octane-raytrace, octane-regexp, octane-richards, 
    1.68 +      octane-splay, octane-typescript"/>
    1.69  
    1.70    <target name="--single-process" unless="${octane-test-sys-prop.separate.process}">
    1.71      <antcall target="octane-single-process"/>
     2.1 --- a/test/script/basic/compile-octane-splitter.js.EXPECTED	Mon Dec 09 10:52:05 2013 +0100
     2.2 +++ b/test/script/basic/compile-octane-splitter.js.EXPECTED	Wed Dec 11 18:09:34 2013 +0100
     2.3 @@ -1,13 +1,14 @@
     2.4 -Compiled OK: box2d
     2.5 -Compiled OK: code-load
     2.6 -Compiled OK: crypto
     2.7 -Compiled OK: deltablue
     2.8 -Compiled OK: earley-boyer
     2.9 -Compiled OK: gbemu
    2.10 -Compiled OK: mandreel
    2.11 -Compiled OK: navier-stokes
    2.12 -Compiled OK: pdfjs
    2.13 -Compiled OK: raytrace
    2.14 -Compiled OK: regexp
    2.15 -Compiled OK: richards
    2.16 -Compiled OK: splay
    2.17 +[box2d] Compiled OK
    2.18 +[code-load] Compiled OK
    2.19 +[crypto] Compiled OK
    2.20 +[deltablue] Compiled OK
    2.21 +[earley-boyer] Compiled OK
    2.22 +[gbemu] Compiled OK
    2.23 +[mandreel] Compiled OK
    2.24 +[navier-stokes] Compiled OK
    2.25 +[pdfjs] Compiled OK
    2.26 +[raytrace] Compiled OK
    2.27 +[regexp] Compiled OK
    2.28 +[richards] Compiled OK
    2.29 +[splay] Compiled OK
    2.30 +[typescript] Compiled OK
     3.1 --- a/test/script/basic/compile-octane.js.EXPECTED	Mon Dec 09 10:52:05 2013 +0100
     3.2 +++ b/test/script/basic/compile-octane.js.EXPECTED	Wed Dec 11 18:09:34 2013 +0100
     3.3 @@ -1,13 +1,14 @@
     3.4 -Compiled OK: box2d
     3.5 -Compiled OK: code-load
     3.6 -Compiled OK: crypto
     3.7 -Compiled OK: deltablue
     3.8 -Compiled OK: earley-boyer
     3.9 -Compiled OK: gbemu
    3.10 -Compiled OK: mandreel
    3.11 -Compiled OK: navier-stokes
    3.12 -Compiled OK: pdfjs
    3.13 -Compiled OK: raytrace
    3.14 -Compiled OK: regexp
    3.15 -Compiled OK: richards
    3.16 -Compiled OK: splay
    3.17 +[box2d] Compiled OK
    3.18 +[code-load] Compiled OK
    3.19 +[crypto] Compiled OK
    3.20 +[deltablue] Compiled OK
    3.21 +[earley-boyer] Compiled OK
    3.22 +[gbemu] Compiled OK
    3.23 +[mandreel] Compiled OK
    3.24 +[navier-stokes] Compiled OK
    3.25 +[pdfjs] Compiled OK
    3.26 +[raytrace] Compiled OK
    3.27 +[regexp] Compiled OK
    3.28 +[richards] Compiled OK
    3.29 +[splay] Compiled OK
    3.30 +[typescript] Compiled OK
     4.1 --- a/test/script/basic/run-octane.js	Mon Dec 09 10:52:05 2013 +0100
     4.2 +++ b/test/script/basic/run-octane.js	Wed Dec 11 18:09:34 2013 +0100
     4.3 @@ -26,19 +26,22 @@
     4.4   */
     4.5  
     4.6  var tests = [
     4.7 -    {file:"box2d",suite:"Box2DBenchmark"},
     4.8 -    {file:"code-load",suite:"CodeLoad"},
     4.9 -    {file:"crypto",suite:"Crypto"},
    4.10 -    {file:"deltablue",suite:"DeltaBlue"},
    4.11 -    {file:"earley-boyer", suite:"EarleyBoyer"},
    4.12 -    {file:"gbemu", suite:"GameboyBenchmark"},
    4.13 -    {file:"mandreel", suite:"MandreelBenchmark"},
    4.14 -    {file:"navier-stokes", suite:"NavierStokes"},
    4.15 -    {file:"pdfjs", suite:"PdfJS"},
    4.16 -    {file:"raytrace", suite:"RayTrace"},
    4.17 -    {file:"regexp", suite:"RegExpSuite"},
    4.18 -    {file:"richards", suite:"Richards"},
    4.19 -    {file:"splay", suite:"Splay"}
    4.20 +    {name:"box2d",         files:["box2d.js"],                         suite:"Box2DBenchmark"},
    4.21 +    {name:"code-load",     files:["code-load.js"],                     suite:"CodeLoad"},
    4.22 +    {name:"crypto",        files:["crypto.js"],                        suite:"Crypto"},
    4.23 +    {name:"deltablue",     files:["deltablue.js"],                     suite:"DeltaBlue"},
    4.24 +    {name:"earley-boyer",  files:["earley-boyer.js"],                  suite:"EarleyBoyer"},
    4.25 +    {name:"gbemu",         files:["gbemu-part1.js", "gbemu-part2.js"], suite:"GameboyBenchmark"},
    4.26 +    {name:"mandreel",      files:["mandreel.js"],                      suite:"MandreelBenchmark"},
    4.27 +    {name:"navier-stokes", files:["navier-stokes.js"],                 suite:"NavierStokes"},
    4.28 +    {name:"pdfjs",         files:["pdfjs.js"],                         suite:"PdfJS"},
    4.29 +    {name:"raytrace",      files:["raytrace.js"],                      suite:"RayTrace"},
    4.30 +    {name:"regexp",        files:["regexp.js"],                        suite:"RegExpSuite"},
    4.31 +    {name:"richards",      files:["richards.js"],                      suite:"Richards"},
    4.32 +    {name:"splay",         files:["splay.js"],                         suite:"Splay"},
    4.33 +    {name:"typescript",    files:["typescript.js", "typescript-input.js", "typescript-compiler.js"], suite:"typescript"}
    4.34 +    //zlib currently disabled - requires read
    4.35 +    //    {name:"zlib",          files:["zlib.js", "zlib-data.js"], suite:"zlib"},
    4.36  ];
    4.37  var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
    4.38  
    4.39 @@ -58,26 +61,36 @@
    4.40      return (typeof compile_only !== 'undefined')
    4.41  }
    4.42  
    4.43 +function load_bench(arg) {
    4.44 +
    4.45 +    for (var idx = 0; idx < arg.files.length; idx++) {
    4.46 +	var f = arg.files[idx];
    4.47 +	var file = f.split('/');
    4.48 +	var file_name = path + file[file.length - 1];
    4.49 +    
    4.50 +	var compile_and_return = should_compile_only(file_name);
    4.51 +	if (compile_and_return) {
    4.52 +	    if (typeof compile_only === 'undefined') { //for a run, skip compile onlies, don't even compile them
    4.53 +		return true;
    4.54 +	    }
    4.55 +	}
    4.56 +	
    4.57 +	print_verbose(arg, "loading '" + arg.name + "' [" + f + "]...");
    4.58 +	load(file_name); 
    4.59 +    }
    4.60 +
    4.61 +    if (compile_and_return) {
    4.62 +	print_always(arg, "Compiled OK");
    4.63 +    }
    4.64 +    return !compile_and_return;
    4.65 +
    4.66 +}
    4.67 +
    4.68  function run_one_benchmark(arg, iters) {
    4.69 -    var file_name;
    4.70 -    var file = (arg.file + ".js").split('/');
    4.71 -    
    4.72 -    file_name = path + file[file.length - 1];
    4.73 -    
    4.74 -    var compile_and_return = should_compile_only(file_name);
    4.75 -    if (compile_and_return) {
    4.76 -	if (typeof compile_only === 'undefined') { //for a run, skip compile onlies, don't even compile them
    4.77 -	    return;
    4.78 -	}
    4.79 -    }
    4.80 -    
    4.81 -    print_verbose("Loading... " + file_name);
    4.82 -    load(file_name);
    4.83 -    
    4.84 -    if (compile_and_return) {
    4.85 -	print_always("Compiled OK: " + arg.file);
    4.86 +
    4.87 +    if (!load_bench(arg)) {
    4.88  	return;
    4.89 -    }
    4.90 +    }    
    4.91      
    4.92      var success = true;
    4.93      var current_name;
    4.94 @@ -95,9 +108,13 @@
    4.95  
    4.96      try {
    4.97  	for (var x = 0; x < benchmarks.length ; x++) { 
    4.98 +	    //do warmup run
    4.99 +	    //reset random number generator needed as of octane 9 before each run
   4.100 +	    BenchmarkSuite.ResetRNG();
   4.101  	    benchmarks[x].Setup();
   4.102  	}
   4.103 -	print_verbose("Running '" + arg.file + "' for " + iters + " iterations of no less than " + min_time + " seconds (" + runtime + ")");
   4.104 +	BenchmarkSuite.ResetRNG();
   4.105 +	print_verbose(arg, "running '" + arg.name + "' for " + iters + " iterations of no less than " + min_time + " seconds (" + runtime + ")");
   4.106  	
   4.107  	var scores = [];
   4.108  	
   4.109 @@ -112,6 +129,9 @@
   4.110  	    do {
   4.111  		for (var i = 0; i < len; i++) {
   4.112  		    benchmarks[i].run();
   4.113 +		    //important - no timing here like elapsed = new Date() - start, as in the 
   4.114 +		    //original harness. This will make timing very non-deterministic.
   4.115 +		    //NOTHING else must live in this loop
   4.116  		}	    
   4.117  		ops += len;
   4.118  		elapsed = new Date - start;
   4.119 @@ -120,7 +140,7 @@
   4.120  	    var score = ops / elapsed * 1000 * 60;
   4.121  	    scores.push(score);
   4.122  	    var name = it == 0 ? "warmup" : "iteration " + it;   
   4.123 -	    print_verbose("[" + arg.file + "] " + name + " finished " + score.toFixed(0) + " ops/minute");
   4.124 +	    print_verbose(arg, name + " finished " + score.toFixed(0) + " ops/minute");
   4.125  	}
   4.126  
   4.127  	for (var x = 0; x < benchmarks.length ; x++) { 
   4.128 @@ -140,20 +160,20 @@
   4.129  	scores = [0];
   4.130      }
   4.131  
   4.132 -    var res = "[" + arg.file + "] " + mean_score.toFixed(0);
   4.133 +    var res = mean_score.toFixed(0);
   4.134      if (verbose) {
   4.135  	res += " ops/minute (" + min_score.toFixed(0) + "-" + max_score.toFixed(0) + "), warmup=" + scores[0].toFixed(0);
   4.136      }
   4.137 -    print_always(res);
   4.138 +    print_always(arg, res);
   4.139  }
   4.140  
   4.141 -function print_always(x) {
   4.142 -    print(x);
   4.143 +function print_always(arg, x) {
   4.144 +    print("[" + arg.name + "] " + x);
   4.145  }
   4.146  
   4.147 -function print_verbose(x) {
   4.148 +function print_verbose(arg, x) {
   4.149      if (verbose) {
   4.150 -	print(x);
   4.151 +	print_always(arg, x)
   4.152      }
   4.153  }
   4.154  
   4.155 @@ -209,7 +229,7 @@
   4.156      } else {
   4.157  	var found = false;
   4.158  	for (j in tests) {
   4.159 -	    if (tests[j].file === arg) {
   4.160 +	    if (tests[j].name === arg) {
   4.161  		tests_found.push(tests[j]);
   4.162  		found = true;
   4.163  		break;
   4.164 @@ -221,7 +241,7 @@
   4.165  		if (j != 0) {
   4.166  		    str += ", ";
   4.167  		}
   4.168 -		str += "'" + tests[j].file + "'";
   4.169 +		str += "'" + tests[j].name + "'";
   4.170  	    }
   4.171  	    throw str;
   4.172  	}

mercurial