8044012: Integrate the latest best known performance flags int ant octane jobs, and make sure that it's easy to compare 'ant octane-nashorn' and 'ant octane-v8' at the push of a button. (or rather; the entry of a command line)

Reviewed-by: jlaskey, sundar
This commit is contained in:
Marcus Lagergren 2014-05-27 21:25:07 +02:00
parent b4b7b4e53d
commit a6e90a4ba3
6 changed files with 319 additions and 346 deletions

View File

@ -922,11 +922,10 @@ A short summary follows:
-cp, -classpath (-cp path. Specify where to find user class files.)
-co, --compile-only (Compile script without running. Exit after compilation)
-co, --compile-only (Compile without running.)
param: [true|false] default: false
-d, --dump-debug-dir (specify a destination directory to dump class files.
This must be combined with the --compile-only option to work)
-d, --dump-debug-dir (specify a destination directory to dump class files.)
param: <path>
--debug-lines (Generate line number table in .class files.)
@ -962,10 +961,6 @@ A short summary follows:
-h, -help (Print help for command line flags.)
param: [true|false] default: false
--lazy-compilation (EXPERIMENTAL: Use lazy code generation strategies - do not compile
the entire script at once.)
param: [true|false] default: false
--loader-per-compile (Create a new class loader per compile.)
param: [true|false] default: true
@ -973,16 +968,16 @@ A short summary follows:
param: <locale> default: en-US
--log (Enable logging of a given level for a given number of sub systems.
[for example: --log=fields:finest,codegen:info])
[for example: --log=fields:finest,codegen:info].)
param: <module:level>,*
-nj, --no-java (No Java support)
-nj, --no-java (Disable Java support.)
param: [true|false] default: false
-nse, --no-syntax-extensions (No non-standard syntax extensions)
-nse, --no-syntax-extensions (Disallow non-standard syntax extensions.)
param: [true|false] default: false
-nta, --no-typed-arrays (No Typed arrays support)
-nta, --no-typed-arrays (Disable typed arrays support.)
param: [true|false] default: false
--parse-only (Parse without compiling.)
@ -991,13 +986,15 @@ A short summary follows:
--print-ast (Print abstract syntax tree.)
param: [true|false] default: false
--print-code (Print bytecode.)
param: [true|false] default: false
-pc, --print-code (Print generated bytecode. If a directory is specified, nothing will
be dumped to stderr. Also, in that case, .dot files will be generated
for all functions or for the function with the specified name only.)
param: [dir:<output-dir>,function:<name>]
--print-lower-ast (Print lowered abstract syntax tree.)
param: [true|false] default: false
--print-lower-parse (Print the parse tree after lowering.)
-plp, --print-lower-parse (Print the parse tree after lowering.)
param: [true|false] default: false
--print-mem-usage (Print memory usage of IR after each compile stage.)
@ -1006,7 +1003,7 @@ A short summary follows:
--print-no-newline (Print function will not print new line char.)
param: [true|false] default: false
--print-parse (Print the parse tree.)
-pp, --print-parse (Print the parse tree.)
param: [true|false] default: false
--print-symbols (Print the symbol table.)
@ -1015,21 +1012,13 @@ A short summary follows:
-pcs, --profile-callsites (Dump callsite profile data.)
param: [true|false] default: false
--range-analysis (EXPERIMENTAL: Do range analysis using known compile time types,
and try to narrow number types)
param: [true|false] default: false
-scripting (Enable scripting features.)
param: [true|false] default: false
--specialize-calls (EXPERIMENTAL: Specialize all or a set of method according
to callsite parameter types)
param: [=function_1,...,function_n]
--stderr (Redirect stderr to a filename or to another tty, e.g. stdout)
--stderr (Redirect stderr to a filename or to another tty, e.g. stdout.)
param: <output console>
--stdout (Redirect stdout to a filename or to another tty, e.g. stderr)
--stdout (Redirect stdout to a filename or to another tty, e.g. stderr.)
param: <output console>
-strict (Run scripts in strict mode.)
@ -1039,7 +1028,7 @@ A short summary follows:
param: <timezone> default: Europe/Stockholm
-tcs, --trace-callsites (Enable callsite trace mode. Options are: miss [trace callsite misses]
enterexit [trace callsite enter/exit], objects [print object properties])
enterexit [trace callsite enter/exit], objects [print object properties].)
param: [=[option,]*]
--verify-code (Verify byte code before running.)

View File

@ -1,372 +1,291 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved.
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
This code is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License version 2 only, as
published by the Free Software Foundation.
This code is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
version 2 for more details (a copy is included in the LICENSE file that
accompanied this code).
You should have received a copy of the GNU General Public License version
2 along with this work; if not, write to the Free Software Foundation,
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
or visit www.oracle.com if you need additional information or have any
questions.
-->
<project name="nashorn-benchmarks" default="all" basedir="..">
<target name="octane-init" depends="jar">
<property name="octane-tests" value="box2d code-load crypto deltablue earley-boyer gbemu navier-stokes mandreel pdfjs raytrace regexp richards splay typescript zlib"/>
</target>
<!-- ignore benchmarks where rhino crashes - the test harness should do this now -->
<target name="octane-init-rhino" depends="jar">
<property name="octane-tests" value="box2d code-load crypto deltablue earley-boyer gbemu navier-stokes mandreel pdfjs raytrace regexp richards splay typescript zlib"/>
</target>
<project
name="nashorn-benchmarks"
default="all"
basedir=".."
xmlns:if="ant:if">
<!--
Below are the octane benchmarks that should be run.
The ones that are excluded, as Nashorn currently has
some issues with them (functionality or performance)
are commented out
-->
<!-- box2d -->
<target name="octane-box2d" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="box2d"/>
</antcall>
</target>
<run-one cond="octane.benchmark.box2d" runtime="nashorn"/>
</target>
<target name="octane-box2d-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="box2d"/>
</antcall>
<run-one cond="octane.benchmark.box2d" runtime="v8"/>
</target>
<target name="octane-box2d-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="box2d"/>
</antcall>
<run-one cond="octane.benchmark.box2d" runtime="rhino"/>
</target>
<!-- code-load -->
<target name="octane-code-load" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="code-load"/>
</antcall>
</target>
<run-one cond="octane.benchmark.code-load" runtime="nashorn"/>
</target>
<target name="octane-code-load-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="code-load"/>
</antcall>
<run-one cond="octane.benchmark.code-load" runtime="v8"/>
</target>
<target name="octane-code-load-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="code-load"/>
</antcall>
<run-one cond="octane.benchmark.code-load" runtime="rhino"/>
</target>
<!-- crypto -->
<target name="octane-crypto" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="crypto"/>
</antcall>
</target>
<run-one cond="octane.benchmark.crypto" runtime="nashorn"/>
</target>
<target name="octane-crypto-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="crypto"/>
</antcall>
<run-one cond="octane.benchmark.crypto" runtime="v8"/>
</target>
<target name="octane-crypto-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="crypto"/>
</antcall>
<run-one cond="octane.benchmark.crypto" runtime="rhino"/>
</target>
<!-- deltablue -->
<target name="octane-deltablue" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="deltablue"/>
</antcall>
</target>
<run-one cond="octane.benchmark.deltablue" runtime="nashorn"/>
</target>
<target name="octane-deltablue-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="deltablue"/>
</antcall>
<run-one cond="octane.benchmark.deltablue" runtime="v8"/>
</target>
<target name="octane-deltablue-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="deltablue"/>
</antcall>
<run-one cond="octane.benchmark.deltablue" runtime="rhino"/>
</target>
<!-- earley-boyer -->
<target name="octane-earley-boyer" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="earley-boyer"/>
</antcall>
</target>
<run-one cond="octane.benchmark.earley-boyer" runtime="nashorn"/>
</target>
<target name="octane-earley-boyer-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="earley-boyer"/>
</antcall>
<run-one cond="octane.benchmark.earley-boyer" runtime="v8"/>
</target>
<target name="octane-earley-boyer-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="earley-boyer"/>
</antcall>
<run-one cond="octane.benchmark.earley-boyer" runtime="rhino"/>
</target>
<!-- gbemu -->
<target name="octane-gbemu" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="gbemu"/>
</antcall>
</target>
<run-one cond="octane.benchmark.gbemu" runtime="nashorn"/>
</target>
<target name="octane-gbemu-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="gbemu"/>
</antcall>
<run-one cond="octane.benchmark.gbemu" runtime="v8"/>
</target>
<target name="octane-gbemu-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="gbemu"/>
</antcall>
<run-one cond="octane.benchmark.gbemu" runtime="rhino"/>
</target>
<!-- mandreel -->
<target name="octane-mandreel" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="mandreel"/>
</antcall>
</target>
<run-one cond="octane.benchmark.mandreel" runtime="nashorn"/>
</target>
<target name="octane-mandreel-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="mandreel"/>
</antcall>
<run-one cond="octane.benchmark.mandreel" runtime="v8"/>
</target>
<target name="octane-mandreel-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="mandreel"/>
</antcall>
<run-one cond="octane.benchmark.mandreel" runtime="rhino"/>
</target>
<!-- navier-stokes -->
<target name="octane-navier-stokes" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="navier-stokes"/>
</antcall>
</target>
<run-one cond="octane.benchmark.navier-stokes" runtime="nashorn"/>
</target>
<target name="octane-navier-stokes-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="navier-stokes"/>
</antcall>
<run-one cond="octane.benchmark.navier-stokes" runtime="v8"/>
</target>
<target name="octane-navier-stokes-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="navier-stokes"/>
</antcall>
<run-one cond="octane.benchmark.navier-stokes" runtime="rhino"/>
</target>
<!-- pdfjs -->
<!-- pdfjs -->
<target name="octane-pdfjs" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="pdfjs"/>
</antcall>
</target>
<run-one cond="octane.benchmark.pdfjs" runtime="nashorn"/>
</target>
<target name="octane-pdfjs-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="pdfjs"/>
</antcall>
<run-one cond="octane.benchmark.pdfjs" runtime="v8"/>
</target>
<target name="octane-pdfjs-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="pdfjs"/>
</antcall>
<run-one cond="octane.benchmark.pdfjs" runtime="rhino"/>
</target>
<!-- raytrace -->
<target name="octane-raytrace" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="raytrace"/>
</antcall>
</target>
<run-one cond="octane.benchmark.raytrace" runtime="nashorn"/>
</target>
<target name="octane-raytrace-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="raytrace"/>
</antcall>
<run-one cond="octane.benchmark.raytrace" runtime="v8"/>
</target>
<target name="octane-raytrace-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="raytrace"/>
</antcall>
<run-one cond="octane.benchmark.raytrace" runtime="rhino"/>
</target>
<!-- regexp -->
<target name="octane-regexp" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="regexp"/>
</antcall>
</target>
<run-one cond="octane.benchmark.regexp" runtime="nashorn"/>
</target>
<target name="octane-regexp-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="regexp"/>
</antcall>
<run-one cond="octane.benchmark.regexp" runtime="v8"/>
</target>
<target name="octane-regexp-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="regexp"/>
</antcall>
<run-one cond="octane.benchmark.regexp" runtime="rhino"/>
</target>
<!-- richards -->
<target name="octane-richards" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="richards"/>
</antcall>
</target>
<run-one cond="octane.benchmark.richards" runtime="nashorn"/>
</target>
<target name="octane-richards-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="richards"/>
</antcall>
<run-one cond="octane.benchmark.richards" runtime="v8"/>
</target>
<target name="octane-richards-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="richards"/>
</antcall>
<run-one cond="octane.benchmark.richards" runtime="rhino"/>
</target>
<!-- splay -->
<target name="octane-splay" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="splay"/>
</antcall>
</target>
<run-one cond="octane.benchmark.splay" runtime="nashorn"/>
</target>
<target name="octane-splay-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-tests" value="splay"/>
</antcall>
<run-one cond="octane.benchmark.splay" runtime="v8"/>
</target>
<target name="octane-splay-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="splay"/>
</antcall>
<run-one cond="octane.benchmark.splay" runtime="rhino"/>
</target>
<!-- splay -->
<!-- typescript -->
<target name="octane-typescript" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="typescript"/>
</antcall>
</target>
<run-one cond="octane.benchmark.typescript" runtime="nashorn"/>
</target>
<target name="octane-typescript-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-typescript" value="typescript"/>
</antcall>
<run-one cond="octane.benchmark.typescript" runtime="v8"/>
</target>
<target name="octane-typescript-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="typescript"/>
</antcall>
<run-one cond="octane.benchmark.typescript" runtime="rhino"/>
</target>
<!-- zlib -->
<target name="octane-zlib" depends="jar">
<antcall target="run-octane">
<param name="octane-tests" value="zlib"/>
</antcall>
</target>
<run-one cond="octane.benchmark.zlib" runtime="nashorn"/>
</target>
<target name="octane-zlib-v8" depends="jar">
<antcall target="run-octane-v8">
<param name="octane-typescript" value="zlib"/>
</antcall>
<run-one cond="octane.benchmark.zlib" runtime="v8"/>
</target>
<target name="octane-zlib-rhino" depends="jar">
<antcall target="run-octane-rhino">
<param name="octane-tests" value="zlib"/>
</antcall>
<run-one cond="octane.benchmark.zlib" runtime="rhino"/>
</target>
<!-- run octane benchmarks in a single process -->
<target name="octane-single-process" depends="octane-init">
<antcall target="run-octane"/>
</target>
<target name="octane-separate-process" depends=
"octane-box2d, octane-code-load, octane-crypto,
octane-deltablue, octane-earley-boyer, octane-gbemu,
octane-mandreel, octane-navier-stokes, octane-pdfjs,
octane-raytrace, octane-regexp, octane-richards,
octane-splay, octane-typescript, octane-zlib"/>
<!--
Benchmark runners for one or more benchmarks, single
or multiple process
-->
<target name="--single-process" unless="${octane-test-sys-prop.separate.process}">
<antcall target="octane-single-process"/>
</target>
<target name="--separate-process" if="${octane-test-sys-prop.separate.process}">
<antcall target="octane-separate-process"/>
</target>
<!-- run 'octane' in single or separate processes based on config -->
<target name="octane" depends="init, --single-process, --separate-process"/>
<!-- run octane benchmarks using octane as runtime -->
<target name="octane-v8" depends="octane-init">
<antcall target="run-octane-v8"/>
</target>
<!-- run octane benchmarks using Rhino as runtime -->
<target name="octane-rhino" depends="octane-init-rhino">
<antcall target="run-octane-rhino"/>
<target name="octane-process-separate" if="${octane-test-sys-prop.separate.process}">
<echo message="Running each benchmark in separate processes, starting new JVMs for each."/>
<!-- TODO: possibly turn this into a loop with ant.contrib -->
<run-one cond="octane.benchmark.box2d" runtime="${runtime}"/>
<!--run-one cond="octane.benchmark.crypto" runtime="${runtime}"/>-->
<run-one cond="octane.benchmark.code-load" runtime="${runtime}"/>
<run-one cond="octane.benchmark.deltablue" runtime="${runtime}"/>
<run-one cond="octane.benchmark.earley-boyer" runtime="${runtime}"/>
<run-one cond="octane.benchmark.gbemu" runtime="${runtime}"/>
<run-one cond="octane.benchmark.navier-stokes" runtime="${runtime}"/>
<run-one cond="octane.benchmark.mandreel" runtime="${runtime}"/>
<run-one cond="octane.benchmark.pdfjs" runtime="${runtime}"/>
<run-one cond="octane.benchmark.raytrace" runtime="${runtime}"/>
<run-one cond="octane.benchmark.regexp" runtime="${runtime}"/>
<run-one cond="octane.benchmark.richards" runtime="${runtime}"/>
<run-one cond="octane.benchmark.splay" runtime="${runtime}"/>
<!--<run-one cond="octane.benchmark.typescript" runtime="${runtime}"/>-->
<!--<run-one cond="octane.benchmark.zlib" runtime="${runtime}"/>-->
</target>
<target name="run-octane">
<target name="octane-process-single" unless="${octane-test-sys-prop.separate.process}">
<echo message="Running all benchmarks in the same process."/>
<echo message="multiple -- ${octane.benchmarks}"/>
<pathconvert property="octane.benchmarks" pathsep=" ">
<propertyset>
<propertyref prefix="octane.benchmark."/>
</propertyset>
</pathconvert>
<echo message="monkey= ${octane.benchmarks}"/>
<antcall target="run-octane${runtime}">
<param name="octane-tests" value="${octane.benchmarks}"/>
</antcall>
</target>
<!--
run 'octane' in single or separate processes based on config
This uses nashorn as the default runtime
-->
<target name="octane-nashorn" depends="jar">
<property name="runtime" value="nashorn"/>
<antcall target="octane-process-separate"/>
<antcall target="octane-process-single"/>
</target>
<!-- alias for 'octane' -->
<target name="octane" depends="octane-nashorn"/>
<!-- run octane benchmarks using octane as runtime -->
<target name="octane-v8" depends="jar">
<property name="runtime" value="v8"/>
<antcall target="octane-process-separate"/>
<antcall target="octane-process-single"/>
</target>
<!-- run octane benchmarks using Rhino as runtime -->
<target name="octane-rhino" depends="jar">
<property name="runtime" value="rhino"/>
<antcall target="octane-process-separate"/>
<antcall target="octane-process-single"/>
</target>
<macrodef name="run-one">
<attribute name="cond"/>
<attribute name="runtime" default=""/>
<sequential>
<antcall target="run-octane-@{runtime}" if:set="@{cond}">
<param name="octane-tests" value="${@{cond}}"/>
</antcall>
</sequential>
</macrodef>
<target name="run-octane-nashorn" if="octane-tests">
<java classname="${nashorn.shell.tool}"
classpath="${run.test.classpath}"
fork="true"
dir=".">
<jvmarg line="${ext.class.path}"/>
<jvmarg line="${run.test.jvmargs.octane} -Xms${run.test.xms} -Xmx${run.test.xmx}"/>
<!-- pass on all properties prefixed with 'nashorn' to the runtime -->
<syspropertyset>
<propertyref prefix="nashorn."/>
</syspropertyset>
@ -375,9 +294,9 @@
<arg value="--"/>
<arg value="${octane-tests}"/>
<arg value="--runtime"/>
<arg value="Nashorn"/>
<arg value="nashorn"/>
<arg value="--verbose"/>
<arg value="--iterations 10"/>
<arg value="--iterations ${octane.iterations}"/>
</java>
</target>
@ -389,7 +308,7 @@
<arg value="--runtime"/>
<arg value="v8"/>
<arg value="--verbose"/>
<arg value="--iterations 10"/>
<arg value="--iterations ${octane.iterations}"/>
</exec>
</target>
@ -404,9 +323,9 @@
<arg value="${octane-test-sys-prop.test.js.framework}"/>
<arg value="${octane-tests}"/>
<arg value="--runtime"/>
<arg value="Rhino"/>
<arg value="rhino"/>
<arg value="--verbose"/>
<arg value="--iterations 10"/>
<arg value="--iterations ${octane.iterations}"/>
</java>
</target>
@ -427,6 +346,8 @@
<pathconvert pathsep=" " property="sunspider-tests" refid="sunspider-set"/>
</target>
<!--- SUNSPIDER JOB BELOW -->
<!-- run sunspider with Nashorn -->
<target name="sunspider" depends="sunspider-init">
<java classname="${nashorn.shell.tool}"
@ -459,6 +380,8 @@
fork="true"
dir=".">
<jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx}"/>
<arg value="-opt"/>
<arg value="9"/>
<arg value="${sunspider-test-sys-prop.test.js.framework}"/>
<arg value="${sunspider-tests}/"/>
</java>

View File

@ -23,10 +23,8 @@
-->
<project name="nashorn" default="test" basedir="..">
<import file="build-nasgen.xml"/>
<import file="build-benchmark.xml"/>
<import file="code_coverage.xml"/>
<target name="init-conditions">
<!-- loading locally defined resources and properties. NB they owerwrite default ones defined later -->
<property file="${user.home}/.nashorn.project.local.properties"/>
@ -616,4 +614,6 @@ grant codeBase "file:/${basedir}/test/script/markdown.js" {
<target name="alltests" depends="exit-if-no-testng, externals, update-externals, test, test262parallel, perf"/>
<import file="build-benchmark.xml"/>
</project>

View File

@ -53,6 +53,7 @@ parallel.test.runner=jdk.nashorn.internal.test.framework.ParallelTestRunner
# test classes directory
build.test.classes.dir=${build.dir}/test/classes
# nashorn test jar - internal tests jar and api tests jar
nashorn.internal.tests.jar=${build.dir}/nashorn-internal-tests.jar
nashorn.api.tests.jar=${build.dir}/nashorn-api-tests.jar
@ -161,19 +162,12 @@ test-sys-prop.test.js.unchecked.dir=${test262.dir}
# test root for octane
octane-test-sys-prop.test.js.roots=${test.external.dir}/octane/
# run octane benchmars in separate processes?
# run octane benchmars in separate processes? (recommended)
octane-test-sys-prop.separate.process=true
# framework root for octane
octane-test-sys-prop.test.js.framework=${test.basic.dir}/run-octane.js
# list of tests to be excluded
# mandreel excluded due to OOM
octane-test-sys-prop.test.js.exclude.list=\
base.js \
run.js \
mandreel.js
# test root for sunspider
sunspider-test-sys-prop.test.js.roots=${test.external.dir}/sunspider/tests/sunspider-1.0.2/
@ -261,8 +255,11 @@ test.src.dir=test/src
run.test.xmx=3G
run.test.xms=2G
#uncomment to enable flight recording - crank up stack trace for lambda forms
# uncomment this jfr.args to enable light recordings. the stack needs to be cranked up to 1024 frames,
# or everything will as of the now drown in lambda forms and be cut off.
#
#jfr.args=-XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath="test_suite.jfr",stackdepth=1024 \
jfr.args=
run.test.user.language=tr
@ -276,34 +273,80 @@ run.test.jvmargs.common=\
${jfr.args} \
-XX:+HeapDumpOnOutOfMemoryError
#-XX:-UseCompressedKlassPointers -XX:+PrintHeapAtGC -XX:ClassMetaspaceSize=300M
# -XX:+PrintCompilation -XX:+UnlockDiagnosticVMOptions -XX:+PrintNMethods
# turn on assertions for tests
run.test.jvmargs.main=${run.test.jvmargs.common} -ea -Dnashorn.optimistic -Dnashorn.lazy
run.test.jvmargs.main=${run.test.jvmargs.common} -ea -Dnashorn.lazy
#-XX:-UseCompressedKlassPointers -XX:+PrintHeapAtGC -XX:ClassMetaspaceSize=300M
run.test.jvmargs.octane.main=${run.test.jvmargs.common}
# extra jvmargs that might be useful for debugging
#
# -XX:+UnlockDiagnosticVMOptions
#
# turn off compressed class pointers in metaspace
# -XX:-UseCompressedKlassPointers
#
# dump the heap after every GC
# -XX:+PrintHeapAtGC
#
# manually set a metaspace size for class data
# -XX:ClassMetaspaceSize=300M
#
# print out methods compiled
# -XX:+PrintCompilation
#
# print all compiled nmethods with oopmaps and lots of other info
# -XX:+PrintNMethods
# Use best known performance options for octane
run.test.jvmargs.octane.main=${run.test.jvmargs.common} -Dnashorn.lazy -XX:+UnlockDiagnosticVMOptions -XX:+UseNewCode -XX:TypeProfileLevel=222
# Security manager args - make sure that we run with the nashorn.policy that the build creates
run.test.jvmsecurityargs=-Xverify:all -Djava.security.manager -Djava.security.policy=${basedir}/build/nashorn.policy
# VM options for script tests with @fork option
test-sys-prop.test.fork.jvm.options=${run.test.jvmargs.main} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs} -cp ${run.test.classpath}
# path of rhino.jar for benchmarks
rhino.jar=
rhino.dir=/Users/marcus/src/rhino
rhino.jar=${rhino.dir}/js.jar
v8.shell=d8
# How many iterations should 'ant octane' run for each
# benchmark
octane.iterations=25
# List of octane tests to run, as properties prefixed with
# "octane.benchmark." mapping to the benchmark name in
# the test harness
#
# Octane tests that are disabled should have their entire line
# commented out Tests may be disabled for functionality reasons when
# they have bugs or when the runtime doesn't handle them (yet)
octane.benchmark.box2d=box2d
#octane.benchmark.code-load=code-load
octane.benchmark.crypto=crypto
octane.benchmark.deltablue=deltablue
octane.benchmark.earley-boyer=earley-boyer
octane.benchmark.gbemu=gbemu
octane.benchmark.navier-stokes=navier-stokes
octane.benchmark.mandreel=mandreel
octane.benchmark.pdfjs=pdfjs
octane.benchmark.raytrace=raytrace
octane.benchmark.regexp=regexp
octane.benchmark.richards=richards
octane.benchmark.splay=splay
#octane.benchmark.typescript=typescript
#octane.benchmark.zlib=zlib
#path to rhino jar file
octaneperf-sys-prop.rhino.jar=${rhino.jar}
#timeout for performance tests in minutes
octaneperf-sys-prop.timeout.value=10
################
# codecoverage #
################
#################
# code coverage #
#################
#enable/disable code coverage; please redifine in the ${user.home}/.nashorn.project.local.properties
make.code.coverage=false
#type of codecoverage; one of static or dynamic. Now only dynamic is supported

View File

@ -170,7 +170,7 @@ nashorn.option.log = { \
is_undocumented=true, \
params="<module:level>,*", \
desc="Enable logging of a given level for a given number of sub systems. \
[for example: --log=fields:finest,codegen:info]", \
[for example: --log=fields:finest,codegen:info].", \
type=Log \
}
@ -198,23 +198,23 @@ nashorn.option.no.java = { \
name="--no-java", \
short_name="-nj", \
is_undocumented=true, \
desc="No Java support", \
desc="Disable Java support.", \
default=false \
}
nashorn.option.no.syntax.extensions = { \
name="--no-syntax-extensions", \
short_name="-nse", \
is_undocumented=true, \
desc="No non-standard syntax extensions", \
default=false \
nashorn.option.no.syntax.extensions = { \
name="--no-syntax-extensions", \
short_name="-nse", \
is_undocumented=true, \
desc="Disallow non-standard syntax extensions.", \
default=false \
}
nashorn.option.no.typed.arrays = { \
name="--no-typed-arrays", \
short_name="-nta", \
is_undocumented=true, \
desc="No Typed arrays support", \
desc="Disable typed arrays support.", \
default=false \
}
@ -300,20 +300,20 @@ nashorn.option.scripting = { \
desc="Enable scripting features." \
}
nashorn.option.stdout = { \
name="--stdout", \
is_undocumented=true, \
type=String, \
params="<output console>", \
desc="Redirect stdout to a filename or to another tty, e.g. stderr" \
nashorn.option.stdout = { \
name="--stdout", \
is_undocumented=true, \
type=String, \
params="<output console>", \
desc="Redirect stdout to a filename or to another tty, e.g. stderr." \
}
nashorn.option.stderr = { \
name="--stderr", \
is_undocumented=true, \
type=String, \
params="<output console>", \
desc="Redirect stderr to a filename or to another tty, e.g. stdout" \
nashorn.option.stderr = { \
name="--stderr", \
is_undocumented=true, \
type=String, \
params="<output console>", \
desc="Redirect stderr to a filename or to another tty, e.g. stdout." \
}
nashorn.option.timezone = { \
@ -333,14 +333,14 @@ nashorn.option.locale = { \
type=Locale \
}
nashorn.option.trace.callsites = { \
name="--trace-callsites", \
short_name="-tcs", \
is_undocumented=true, \
type=keyvalues, \
params="[=[option,]*]", \
desc="Enable callsite trace mode. Options are: miss [trace callsite misses] \
enterexit [trace callsite enter/exit], objects [print object properties]" \
nashorn.option.trace.callsites = { \
name="--trace-callsites", \
short_name="-tcs", \
is_undocumented=true, \
type=keyvalues, \
params="[=[option,]*]", \
desc="Enable callsite trace mode. Options are: miss [trace callsite misses] \
enterexit [trace callsite enter/exit], objects [print object properties]." \
}
nashorn.option.verify.code = { \

View File

@ -25,13 +25,6 @@
* @subtest
*/
var read;
try {
read = readFully;
} catch (e) {
print("ABORTING: Cannot find 'readFully'. You must have scripting enabled to use this test harness. (-scripting)");
throw e;
}
function initZlib() {
zlib = new BenchmarkSuite('zlib', [152815148], [
@ -62,7 +55,7 @@ var dir = (typeof(__DIR__) == 'undefined') ? "test/script/basic/" : __DIR__;
// TODO: why is this path hard coded when it's defined in project properties?
var path = dir + "../external/octane/";
var runtime = "";
var runtime = undefined;
var verbose = false;
var numberOfIterations = 5;
@ -133,7 +126,7 @@ function run_one_benchmark(arg, iters) {
benchmarks[x].Setup();
}
BenchmarkSuite.ResetRNG();
print_verbose(arg, "running '" + arg.name + "' for " + iters + " iterations of no less than " + min_time + " seconds (" + runtime + ")");
print_verbose(arg, "running '" + arg.name + "' for " + iters + " iterations of no less than " + min_time + " seconds");
var scores = [];
@ -188,8 +181,12 @@ function run_one_benchmark(arg, iters) {
print_always(arg, res);
}
function runtime_string() {
return runtime == undefined ? "" : ("[" + runtime + "] ");
}
function print_always(arg, x) {
print("[" + arg.name + "] " + x);
print(runtime_string() + "[" + arg.name + "] " + x);
}
function print_verbose(arg, x) {
@ -204,8 +201,6 @@ function run_suite(tests, iters) {
}
}
runtime = "command line";
var args = [];
if (typeof $ARGS !== 'undefined') {
@ -281,7 +276,30 @@ if (tests_found.length == 0) {
}
}
tests_found.sort();
// returns false for rhino, v8 and all other javascript runtimes, true for Nashorn
function is_this_nashorn() {
return typeof Error.dumpStack == 'function'
}
if (is_this_nashorn()) {
try {
read = readFully;
} catch (e) {
print("ABORTING: Cannot find 'readFully'. You must have scripting enabled to use this test harness. (-scripting)");
throw e;
}
}
// run tests in alphabetical order by name
tests_found.sort(function(a, b) {
if (a.name < b.name) {
return -1;
} else if (a.name > b.name) {
return 1;
} else {
return 0;
}
});
load(path + 'base.js');
run_suite(tests_found, iters);