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