8029090: Developers should be able to pass nashorn properties and enable/disable JFR from command line
authorsundar
Mon, 25 Nov 2013 18:40:02 +0530
changeset 22366 1db7c8634626
parent 21869 da99d0cbd413
child 22367 8c17b1979d29
8029090: Developers should be able to pass nashorn properties and enable/disable JFR from command line Reviewed-by: jlaskey, lagergren
nashorn/make/build-benchmark.xml
nashorn/make/build.xml
nashorn/make/project.properties
--- a/nashorn/make/build-benchmark.xml	Tue Nov 19 10:29:32 2013 +0100
+++ b/nashorn/make/build-benchmark.xml	Mon Nov 25 18:40:02 2013 +0530
@@ -330,6 +330,9 @@
           dir=".">
       <jvmarg line="${ext.class.path}"/>
       <jvmarg line="${run.test.jvmargs.octane} -Xms${run.test.xms} -Xmx${run.test.xmx}"/>
+      <syspropertyset>
+        <propertyref prefix="nashorn."/>
+      </syspropertyset>
       <arg value="${octane-test-sys-prop.test.js.framework}"/>
       <arg value="--"/>
       <arg value="${octane-tests}"/>
--- a/nashorn/make/build.xml	Tue Nov 19 10:29:32 2013 +0100
+++ b/nashorn/make/build.xml	Mon Nov 25 18:40:02 2013 +0530
@@ -56,13 +56,16 @@
     <condition property="exclude.list" value="./exclude/exclude_list_cc.txt" else="./exclude/exclude_list.txt">
       <istrue value="${make.code.coverage}" />
     </condition>
+
+    <condition property="jfr.options" value="${run.test.jvmargs.jfr}" else="">
+      <istrue value="${jfr}"/>
+    </condition>
   </target>
 
   <target name="init" depends="init-conditions, init-cc">
-
     <!-- extends jvm args -->
-    <property name="run.test.jvmargs" value="${run.test.jvmargs.main}  ${run.test.cc.jvmargs}"/>
-    <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main}  ${run.test.cc.jvmargs}" />
+    <property name="run.test.jvmargs" value="${run.test.jvmargs.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
+    <property name="run.test.jvmargs.octane" value="${run.test.jvmargs.octane.main} ${run.test.cc.jvmargs} ${jfr.options}"/>
 
     <echo message="run.test.jvmargs=${run.test.jvmargs}"/>
     <echo message="run.test.jvmargs.octane=${run.test.jvmargs.octane}"/>
@@ -329,6 +332,9 @@
       <jvmarg line="${ext.class.path}"/>
       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
       <propertyset>
+        <propertyref prefix="nashorn."/>
+      </propertyset>
+      <propertyset>
         <propertyref prefix="test-sys-prop."/>
         <mapper from="test-sys-prop.*" to="*" type="glob"/>
       </propertyset>
@@ -361,6 +367,9 @@
       <jvmarg line="${ext.class.path}"/>
       <jvmarg line="${run.test.jvmargs} -Xmx${run.test.xmx} ${run.test.jvmsecurityargs}"/>
       <propertyset>
+        <propertyref prefix="nashorn."/>
+      </propertyset>
+      <propertyset>
         <propertyref prefix="test262-test-sys-prop."/>
         <mapper from="test262-test-sys-prop.*" to="*" type="glob"/>
       </propertyset>
--- a/nashorn/make/project.properties	Tue Nov 19 10:29:32 2013 +0100
+++ b/nashorn/make/project.properties	Mon Nov 25 18:40:02 2013 +0530
@@ -71,6 +71,9 @@
 fxshell.dir = tools/fxshell
 fxshell.jar = ${dist.dir}/nashornfx.jar
 
+# configuration for java flight recorder
+run.test.jvmargs.jfr=-XX:+UnlockCommercialFeatures -XX:+FlightRecorder -XX:FlightRecorderOptions=defaultrecording=true,disk=true,dumponexit=true,dumponexitpath=${build.dir},stackdepth=128
+
 # jars refererred
 file.reference.testng.jar=test/lib/testng.jar