make/build-benchmark.xml

Wed, 27 Apr 2016 01:36:41 +0800

author
aoqi
date
Wed, 27 Apr 2016 01:36:41 +0800
changeset 0
b1a7da25b547
child 952
6d5471a497fb
permissions
-rw-r--r--

Initial load
http://hg.openjdk.java.net/jdk8u/jdk8u/nashorn/
changeset: 1034:4b9cc65dd24d
tag: jdk8u25-b17

aoqi@0 1 <?xml version="1.0" encoding="UTF-8"?>
aoqi@0 2 <!--
aoqi@0 3 Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
aoqi@0 4 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
aoqi@0 5
aoqi@0 6 This code is free software; you can redistribute it and/or modify it
aoqi@0 7 under the terms of the GNU General Public License version 2 only, as
aoqi@0 8 published by the Free Software Foundation.
aoqi@0 9
aoqi@0 10 This code is distributed in the hope that it will be useful, but WITHOUT
aoqi@0 11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
aoqi@0 12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
aoqi@0 13 version 2 for more details (a copy is included in the LICENSE file that
aoqi@0 14 accompanied this code).
aoqi@0 15
aoqi@0 16 You should have received a copy of the GNU General Public License version
aoqi@0 17 2 along with this work; if not, write to the Free Software Foundation,
aoqi@0 18 Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
aoqi@0 19
aoqi@0 20 Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
aoqi@0 21 or visit www.oracle.com if you need additional information or have any
aoqi@0 22 questions.
aoqi@0 23 -->
aoqi@0 24 <project name="nashorn-benchmarks" default="all" basedir="..">
aoqi@0 25
aoqi@0 26 <target name="octane-init" depends="jar">
aoqi@0 27 <property name="octane-tests" value="box2d code-load crypto deltablue earley-boyer gbemu navier-stokes pdfjs raytrace regexp richards splay"/>
aoqi@0 28 </target>
aoqi@0 29
aoqi@0 30 <!-- ignore benchmarks where rhino crashes -->
aoqi@0 31 <target name="octane-init-rhino" depends="jar">
aoqi@0 32 <property name="octane-tests" value="box2d code-load crypto deltablue earley-boyer gbemu navier-stokes raytrace regexp richards splay"/>
aoqi@0 33 </target>
aoqi@0 34
aoqi@0 35 <!-- box2d -->
aoqi@0 36 <target name="octane-box2d" depends="jar">
aoqi@0 37 <antcall target="run-octane">
aoqi@0 38 <param name="octane-tests" value="box2d"/>
aoqi@0 39 </antcall>
aoqi@0 40 </target>
aoqi@0 41
aoqi@0 42 <target name="octane-box2d-v8" depends="jar">
aoqi@0 43 <antcall target="run-octane-v8">
aoqi@0 44 <param name="octane-tests" value="box2d"/>
aoqi@0 45 </antcall>
aoqi@0 46 </target>
aoqi@0 47
aoqi@0 48 <target name="octane-box2d-rhino" depends="jar">
aoqi@0 49 <antcall target="run-octane-rhino">
aoqi@0 50 <param name="octane-tests" value="box2d"/>
aoqi@0 51 </antcall>
aoqi@0 52 </target>
aoqi@0 53
aoqi@0 54
aoqi@0 55 <!-- code-load -->
aoqi@0 56 <target name="octane-code-load" depends="jar">
aoqi@0 57 <antcall target="run-octane">
aoqi@0 58 <param name="octane-tests" value="code-load"/>
aoqi@0 59 </antcall>
aoqi@0 60 </target>
aoqi@0 61
aoqi@0 62 <target name="octane-code-load-v8" depends="jar">
aoqi@0 63 <antcall target="run-octane-v8">
aoqi@0 64 <param name="octane-tests" value="code-load"/>
aoqi@0 65 </antcall>
aoqi@0 66 </target>
aoqi@0 67
aoqi@0 68 <target name="octane-code-load-rhino" depends="jar">
aoqi@0 69 <antcall target="run-octane-rhino">
aoqi@0 70 <param name="octane-tests" value="code-load"/>
aoqi@0 71 </antcall>
aoqi@0 72 </target>
aoqi@0 73
aoqi@0 74
aoqi@0 75 <!-- crypto -->
aoqi@0 76 <target name="octane-crypto" depends="jar">
aoqi@0 77 <antcall target="run-octane">
aoqi@0 78 <param name="octane-tests" value="crypto"/>
aoqi@0 79 </antcall>
aoqi@0 80 </target>
aoqi@0 81
aoqi@0 82 <target name="octane-crypto-v8" depends="jar">
aoqi@0 83 <antcall target="run-octane-v8">
aoqi@0 84 <param name="octane-tests" value="crypto"/>
aoqi@0 85 </antcall>
aoqi@0 86 </target>
aoqi@0 87
aoqi@0 88 <target name="octane-crypto-rhino" depends="jar">
aoqi@0 89 <antcall target="run-octane-rhino">
aoqi@0 90 <param name="octane-tests" value="crypto"/>
aoqi@0 91 </antcall>
aoqi@0 92 </target>
aoqi@0 93
aoqi@0 94
aoqi@0 95 <!-- deltablue -->
aoqi@0 96 <target name="octane-deltablue" depends="jar">
aoqi@0 97 <antcall target="run-octane">
aoqi@0 98 <param name="octane-tests" value="deltablue"/>
aoqi@0 99 </antcall>
aoqi@0 100 </target>
aoqi@0 101
aoqi@0 102 <target name="octane-deltablue-v8" depends="jar">
aoqi@0 103 <antcall target="run-octane-v8">
aoqi@0 104 <param name="octane-tests" value="deltablue"/>
aoqi@0 105 </antcall>
aoqi@0 106 </target>
aoqi@0 107
aoqi@0 108 <target name="octane-deltablue-rhino" depends="jar">
aoqi@0 109 <antcall target="run-octane-rhino">
aoqi@0 110 <param name="octane-tests" value="deltablue"/>
aoqi@0 111 </antcall>
aoqi@0 112 </target>
aoqi@0 113
aoqi@0 114
aoqi@0 115 <!-- earley-boyer -->
aoqi@0 116 <target name="octane-earley-boyer" depends="jar">
aoqi@0 117 <antcall target="run-octane">
aoqi@0 118 <param name="octane-tests" value="earley-boyer"/>
aoqi@0 119 </antcall>
aoqi@0 120 </target>
aoqi@0 121
aoqi@0 122 <target name="octane-earley-boyer-v8" depends="jar">
aoqi@0 123 <antcall target="run-octane-v8">
aoqi@0 124 <param name="octane-tests" value="earley-boyer"/>
aoqi@0 125 </antcall>
aoqi@0 126 </target>
aoqi@0 127
aoqi@0 128 <target name="octane-earley-boyer-rhino" depends="jar">
aoqi@0 129 <antcall target="run-octane-rhino">
aoqi@0 130 <param name="octane-tests" value="earley-boyer"/>
aoqi@0 131 </antcall>
aoqi@0 132 </target>
aoqi@0 133
aoqi@0 134
aoqi@0 135 <!-- gbemu -->
aoqi@0 136 <target name="octane-gbemu" depends="jar">
aoqi@0 137 <antcall target="run-octane">
aoqi@0 138 <param name="octane-tests" value="gbemu"/>
aoqi@0 139 </antcall>
aoqi@0 140 </target>
aoqi@0 141
aoqi@0 142 <target name="octane-gbemu-v8" depends="jar">
aoqi@0 143 <antcall target="run-octane-v8">
aoqi@0 144 <param name="octane-tests" value="gbemu"/>
aoqi@0 145 </antcall>
aoqi@0 146 </target>
aoqi@0 147
aoqi@0 148 <target name="octane-gbemu-rhino" depends="jar">
aoqi@0 149 <antcall target="run-octane-rhino">
aoqi@0 150 <param name="octane-tests" value="gbemu"/>
aoqi@0 151 </antcall>
aoqi@0 152 </target>
aoqi@0 153
aoqi@0 154
aoqi@0 155 <!-- mandreel -->
aoqi@0 156 <target name="octane-mandreel" depends="jar">
aoqi@0 157 <antcall target="run-octane">
aoqi@0 158 <param name="octane-tests" value="mandreel"/>
aoqi@0 159 </antcall>
aoqi@0 160 </target>
aoqi@0 161
aoqi@0 162 <target name="octane-mandreel-v8" depends="jar">
aoqi@0 163 <antcall target="run-octane-v8">
aoqi@0 164 <param name="octane-tests" value="mandreel"/>
aoqi@0 165 </antcall>
aoqi@0 166 </target>
aoqi@0 167
aoqi@0 168 <target name="octane-mandreel-rhino" depends="jar">
aoqi@0 169 <antcall target="run-octane-rhino">
aoqi@0 170 <param name="octane-tests" value="mandreel"/>
aoqi@0 171 </antcall>
aoqi@0 172 </target>
aoqi@0 173
aoqi@0 174
aoqi@0 175 <!-- navier-stokes -->
aoqi@0 176 <target name="octane-navier-stokes" depends="jar">
aoqi@0 177 <antcall target="run-octane">
aoqi@0 178 <param name="octane-tests" value="navier-stokes"/>
aoqi@0 179 </antcall>
aoqi@0 180 </target>
aoqi@0 181
aoqi@0 182 <target name="octane-navier-stokes-v8" depends="jar">
aoqi@0 183 <antcall target="run-octane-v8">
aoqi@0 184 <param name="octane-tests" value="navier-stokes"/>
aoqi@0 185 </antcall>
aoqi@0 186 </target>
aoqi@0 187
aoqi@0 188 <target name="octane-navier-stokes-rhino" depends="jar">
aoqi@0 189 <antcall target="run-octane-rhino">
aoqi@0 190 <param name="octane-tests" value="navier-stokes"/>
aoqi@0 191 </antcall>
aoqi@0 192 </target>
aoqi@0 193
aoqi@0 194
aoqi@0 195 <!-- pdfjs -->
aoqi@0 196 <target name="octane-pdfjs" depends="jar">
aoqi@0 197 <antcall target="run-octane">
aoqi@0 198 <param name="octane-tests" value="pdfjs"/>
aoqi@0 199 </antcall>
aoqi@0 200 </target>
aoqi@0 201
aoqi@0 202 <target name="octane-pdfjs-v8" depends="jar">
aoqi@0 203 <antcall target="run-octane-v8">
aoqi@0 204 <param name="octane-tests" value="pdfjs"/>
aoqi@0 205 </antcall>
aoqi@0 206 </target>
aoqi@0 207
aoqi@0 208 <target name="octane-pdfjs-rhino" depends="jar">
aoqi@0 209 <antcall target="run-octane-rhino">
aoqi@0 210 <param name="octane-tests" value="pdfjs"/>
aoqi@0 211 </antcall>
aoqi@0 212 </target>
aoqi@0 213
aoqi@0 214
aoqi@0 215 <!-- raytrace -->
aoqi@0 216 <target name="octane-raytrace" depends="jar">
aoqi@0 217 <antcall target="run-octane">
aoqi@0 218 <param name="octane-tests" value="raytrace"/>
aoqi@0 219 </antcall>
aoqi@0 220 </target>
aoqi@0 221
aoqi@0 222 <target name="octane-raytrace-v8" depends="jar">
aoqi@0 223 <antcall target="run-octane-v8">
aoqi@0 224 <param name="octane-tests" value="raytrace"/>
aoqi@0 225 </antcall>
aoqi@0 226 </target>
aoqi@0 227
aoqi@0 228 <target name="octane-raytrace-rhino" depends="jar">
aoqi@0 229 <antcall target="run-octane-rhino">
aoqi@0 230 <param name="octane-tests" value="raytrace"/>
aoqi@0 231 </antcall>
aoqi@0 232 </target>
aoqi@0 233
aoqi@0 234
aoqi@0 235 <!-- regexp -->
aoqi@0 236 <target name="octane-regexp" depends="jar">
aoqi@0 237 <antcall target="run-octane">
aoqi@0 238 <param name="octane-tests" value="regexp"/>
aoqi@0 239 </antcall>
aoqi@0 240 </target>
aoqi@0 241
aoqi@0 242 <target name="octane-regexp-v8" depends="jar">
aoqi@0 243 <antcall target="run-octane-v8">
aoqi@0 244 <param name="octane-tests" value="regexp"/>
aoqi@0 245 </antcall>
aoqi@0 246 </target>
aoqi@0 247
aoqi@0 248 <target name="octane-regexp-rhino" depends="jar">
aoqi@0 249 <antcall target="run-octane-rhino">
aoqi@0 250 <param name="octane-tests" value="regexp"/>
aoqi@0 251 </antcall>
aoqi@0 252 </target>
aoqi@0 253
aoqi@0 254
aoqi@0 255 <!-- richards -->
aoqi@0 256 <target name="octane-richards" depends="jar">
aoqi@0 257 <antcall target="run-octane">
aoqi@0 258 <param name="octane-tests" value="richards"/>
aoqi@0 259 </antcall>
aoqi@0 260 </target>
aoqi@0 261
aoqi@0 262 <target name="octane-richards-v8" depends="jar">
aoqi@0 263 <antcall target="run-octane-v8">
aoqi@0 264 <param name="octane-tests" value="richards"/>
aoqi@0 265 </antcall>
aoqi@0 266 </target>
aoqi@0 267
aoqi@0 268 <target name="octane-richards-rhino" depends="jar">
aoqi@0 269 <antcall target="run-octane-rhino">
aoqi@0 270 <param name="octane-tests" value="richards"/>
aoqi@0 271 </antcall>
aoqi@0 272 </target>
aoqi@0 273
aoqi@0 274
aoqi@0 275 <!-- splay -->
aoqi@0 276 <target name="octane-splay" depends="jar">
aoqi@0 277 <antcall target="run-octane">
aoqi@0 278 <param name="octane-tests" value="splay"/>
aoqi@0 279 </antcall>
aoqi@0 280 </target>
aoqi@0 281
aoqi@0 282 <target name="octane-splay-v8" depends="jar">
aoqi@0 283 <antcall target="run-octane-v8">
aoqi@0 284 <param name="octane-tests" value="splay"/>
aoqi@0 285 </antcall>
aoqi@0 286 </target>
aoqi@0 287
aoqi@0 288 <target name="octane-splay-rhino" depends="jar">
aoqi@0 289 <antcall target="run-octane-rhino">
aoqi@0 290 <param name="octane-tests" value="splay"/>
aoqi@0 291 </antcall>
aoqi@0 292 </target>
aoqi@0 293
aoqi@0 294 <!-- splay -->
aoqi@0 295 <target name="octane-typescript" depends="jar">
aoqi@0 296 <antcall target="run-octane">
aoqi@0 297 <param name="octane-tests" value="typescript"/>
aoqi@0 298 </antcall>
aoqi@0 299 </target>
aoqi@0 300
aoqi@0 301 <target name="octane-typescript-v8" depends="jar">
aoqi@0 302 <antcall target="run-octane-v8">
aoqi@0 303 <param name="octane-typescript" value="typescript"/>
aoqi@0 304 </antcall>
aoqi@0 305 </target>
aoqi@0 306
aoqi@0 307 <target name="octane-typescript-rhino" depends="jar">
aoqi@0 308 <antcall target="run-octane-rhino">
aoqi@0 309 <param name="octane-tests" value="typescript"/>
aoqi@0 310 </antcall>
aoqi@0 311 </target>
aoqi@0 312
aoqi@0 313 <!-- zlib -->
aoqi@0 314 <target name="octane-zlib" depends="jar">
aoqi@0 315 <antcall target="run-octane">
aoqi@0 316 <param name="octane-tests" value="zlib"/>
aoqi@0 317 </antcall>
aoqi@0 318 </target>
aoqi@0 319
aoqi@0 320 <target name="octane-zlib-v8" depends="jar">
aoqi@0 321 <antcall target="run-octane-v8">
aoqi@0 322 <param name="octane-typescript" value="zlib"/>
aoqi@0 323 </antcall>
aoqi@0 324 </target>
aoqi@0 325
aoqi@0 326 <target name="octane-zlib-rhino" depends="jar">
aoqi@0 327 <antcall target="run-octane-rhino">
aoqi@0 328 <param name="octane-tests" value="zlib"/>
aoqi@0 329 </antcall>
aoqi@0 330 </target>
aoqi@0 331
aoqi@0 332 <!-- run octane benchmarks in a single process -->
aoqi@0 333 <target name="octane-single-process" depends="octane-init">
aoqi@0 334 <antcall target="run-octane"/>
aoqi@0 335 </target>
aoqi@0 336
aoqi@0 337 <!-- zlib excluded due to missing implementation of 'read' -->
aoqi@0 338 <target name="octane-separate-process" depends=
aoqi@0 339 "octane-box2d, octane-code-load, octane-crypto,
aoqi@0 340 octane-deltablue, octane-earley-boyer, octane-gbemu,
aoqi@0 341 octane-mandreel, octane-navier-stokes, octane-pdfjs,
aoqi@0 342 octane-raytrace, octane-regexp, octane-richards,
aoqi@0 343 octane-splay, octane-typescript"/>
aoqi@0 344
aoqi@0 345 <target name="--single-process" unless="${octane-test-sys-prop.separate.process}">
aoqi@0 346 <antcall target="octane-single-process"/>
aoqi@0 347 </target>
aoqi@0 348 <target name="--separate-process" if="${octane-test-sys-prop.separate.process}">
aoqi@0 349 <antcall target="octane-separate-process"/>
aoqi@0 350 </target>
aoqi@0 351
aoqi@0 352 <!-- run 'octane' in single or separate processes based on config -->
aoqi@0 353 <target name="octane" depends="init, --single-process, --separate-process"/>
aoqi@0 354
aoqi@0 355 <!-- run octane benchmarks using octane as runtime -->
aoqi@0 356 <target name="octane-v8" depends="octane-init">
aoqi@0 357 <antcall target="run-octane-v8"/>
aoqi@0 358 </target>
aoqi@0 359
aoqi@0 360 <!-- run octane benchmarks using Rhino as runtime -->
aoqi@0 361 <target name="octane-rhino" depends="octane-init-rhino">
aoqi@0 362 <antcall target="run-octane-rhino"/>
aoqi@0 363 </target>
aoqi@0 364
aoqi@0 365 <target name="run-octane">
aoqi@0 366 <java classname="${nashorn.shell.tool}"
aoqi@0 367 classpath="${run.test.classpath}"
aoqi@0 368 fork="true"
aoqi@0 369 dir=".">
aoqi@0 370 <jvmarg line="${ext.class.path}"/>
aoqi@0 371 <jvmarg line="${run.test.jvmargs.octane} -Xms${run.test.xms} -Xmx${run.test.xmx}"/>
aoqi@0 372 <arg value="${octane-test-sys-prop.test.js.framework}"/>
aoqi@0 373 <arg value="--"/>
aoqi@0 374 <arg value="${octane-tests}"/>
aoqi@0 375 <arg value="--runtime"/>
aoqi@0 376 <arg value="Nashorn"/>
aoqi@0 377 <arg value="--verbose"/>
aoqi@0 378 <arg value="--iterations 8"/>
aoqi@0 379 </java>
aoqi@0 380 </target>
aoqi@0 381
aoqi@0 382 <target name="run-octane-v8">
aoqi@0 383 <exec executable="${v8.shell}">
aoqi@0 384 <arg value="${octane-test-sys-prop.test.js.framework}"/>
aoqi@0 385 <arg value="--"/>
aoqi@0 386 <arg value="${octane-tests}"/>
aoqi@0 387 <arg value="--runtime"/>
aoqi@0 388 <arg value="v8"/>
aoqi@0 389 <arg value="--verbose"/>
aoqi@0 390 <arg value="--iterations 8"/>
aoqi@0 391 </exec>
aoqi@0 392 </target>
aoqi@0 393
aoqi@0 394 <target name="run-octane-rhino">
aoqi@0 395 <java jar="${rhino.jar}"
aoqi@0 396 classpath="${run.test.classpath}"
aoqi@0 397 fork="true"
aoqi@0 398 dir=".">
aoqi@0 399 <jvmarg line="${run.test.jvmargs.octane} -Xms${run.test.xms} -Xmx${run.test.xmx}"/>
aoqi@0 400 <arg value="${octane-test-sys-prop.test.js.framework}"/>
aoqi@0 401 <arg value="${octane-tests}"/>
aoqi@0 402 <arg value="--runtime"/>
aoqi@0 403 <arg value="Rhino"/>
aoqi@0 404 <arg value="--verbose"/>
aoqi@0 405 <arg value="--iterations 8"/>
aoqi@0 406 </java>
aoqi@0 407 </target>
aoqi@0 408
aoqi@0 409 <!-- run octane with all known runtimes for comparison -->
aoqi@0 410 <target name="octane-all" depends="octane, octane-v8, octane-rhino">
aoqi@0 411 <exec executable="${v8.shell}">
aoqi@0 412 <arg value="${octane-test-sys-prop.test.js.framework}"/>
aoqi@0 413 <arg value="${octane-tests}/"/>
aoqi@0 414 </exec>
aoqi@0 415 </target>
aoqi@0 416
aoqi@0 417 <target name="sunspider-init" depends="jar">
aoqi@0 418 <fileset id="sunspider-set"
aoqi@0 419 dir="${sunspider-test-sys-prop.test.js.roots}"
aoqi@0 420 excludes="${sunspider-test-sys-prop.test.js.exclude.list}">
aoqi@0 421 <include name="**/*.js"/>
aoqi@0 422 </fileset>
aoqi@0 423 <pathconvert pathsep=" " property="sunspider-tests" refid="sunspider-set"/>
aoqi@0 424 </target>
aoqi@0 425
aoqi@0 426 <!-- run sunspider with Nashorn -->
aoqi@0 427 <target name="sunspider" depends="sunspider-init">
aoqi@0 428 <java classname="${nashorn.shell.tool}"
aoqi@0 429 classpath="${run.test.classpath}"
aoqi@0 430 fork="true"
aoqi@0 431 dir=".">
aoqi@0 432 <jvmarg line="${ext.class.path}"/>
aoqi@0 433 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
aoqi@0 434 <arg value="-timezone=PST"/>
aoqi@0 435 <arg value="--class-cache-size=50"/>
aoqi@0 436 <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
aoqi@0 437 <arg value="--"/>
aoqi@0 438 <arg value="${sunspider-tests}/"/>
aoqi@0 439 </java>
aoqi@0 440 </target>
aoqi@0 441
aoqi@0 442 <!-- run sunspider with v8 -->
aoqi@0 443 <target name="sunspider-v8" depends="sunspider-init">
aoqi@0 444 <exec executable="${v8.shell}">
aoqi@0 445 <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
aoqi@0 446 <arg value="--"/>
aoqi@0 447 <arg value="${sunspider-tests}/"/>
aoqi@0 448 </exec>
aoqi@0 449 </target>
aoqi@0 450
aoqi@0 451 <!-- run sunspider with Rhino -->
aoqi@0 452 <target name="sunspider-rhino" depends="sunspider-init">
aoqi@0 453 <java jar="${rhino.jar}"
aoqi@0 454 classpath="${run.test.classpath}"
aoqi@0 455 fork="true"
aoqi@0 456 dir=".">
aoqi@0 457 <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
aoqi@0 458 <arg value="${sunspider-test-sys-prop.test.js.framework}"/>
aoqi@0 459 <arg value="${sunspider-tests}/"/>
aoqi@0 460 </java>
aoqi@0 461 </target>
aoqi@0 462
aoqi@0 463 </project>

mercurial