Showing compiler optimization impact on behaviour of garbage collector
authorJaroslav Tulach <jtulach@netbeans.org>
Wed, 15 Oct 2008 21:22:54 +0200
changeset 280e619b35c903e
parent 279 6f0a50e17610
child 281 6befc59fc53c
Showing compiler optimization impact on behaviour of garbage collector
samples/gc/build.xml
samples/gc/nbproject/build-impl.xml
samples/gc/nbproject/genfiles.properties
     1.1 --- a/samples/gc/build.xml	Fri Aug 29 15:44:59 2008 +0200
     1.2 +++ b/samples/gc/build.xml	Wed Oct 15 21:22:54 2008 +0200
     1.3 @@ -2,6 +2,11 @@
     1.4  <!-- You may freely edit this file. See commented blocks below for -->
     1.5  <!-- some examples of how to customize the build. -->
     1.6  <!-- (If you delete it and reopen the project it will be recreated.) -->
     1.7 +<!-- By default, only the Clean and Build commands use this build script. -->
     1.8 +<!-- Commands such as Run, Debug, and Test only use this build script if -->
     1.9 +<!-- the Compile on Save feature is turned off for the project. -->
    1.10 +<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
    1.11 +<!-- in the project's Project Properties dialog box.-->
    1.12  <project name="gc" default="default" basedir=".">
    1.13      <description>Builds, tests, and runs the project gc.</description>
    1.14      <import file="nbproject/build-impl.xml"/>
     2.1 --- a/samples/gc/nbproject/build-impl.xml	Fri Aug 29 15:44:59 2008 +0200
     2.2 +++ b/samples/gc/nbproject/build-impl.xml	Wed Oct 15 21:22:54 2008 +0200
     2.3 @@ -19,7 +19,7 @@
     2.4    - cleanup
     2.5  
     2.6          -->
     2.7 -<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="gc-impl">
     2.8 +<project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="gc-impl">
     2.9      <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/>
    2.10      <!-- 
    2.11                  ======================
    2.12 @@ -218,13 +218,13 @@
    2.13              </sequential>
    2.14          </macrodef>
    2.15      </target>
    2.16 -    <target name="-init-macrodef-nbjpda">
    2.17 +    <target depends="-init-debug-args" name="-init-macrodef-nbjpda">
    2.18          <macrodef name="nbjpdastart" uri="http://www.netbeans.org/ns/j2se-project/1">
    2.19              <attribute default="${main.class}" name="name"/>
    2.20              <attribute default="${debug.classpath}" name="classpath"/>
    2.21              <attribute default="" name="stopclassname"/>
    2.22              <sequential>
    2.23 -                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="dt_socket">
    2.24 +                <nbjpdastart addressproperty="jpda.address" name="@{name}" stopclassname="@{stopclassname}" transport="${debug-transport}">
    2.25                      <classpath>
    2.26                          <path path="@{classpath}"/>
    2.27                      </classpath>
    2.28 @@ -235,7 +235,9 @@
    2.29              <attribute default="${build.classes.dir}" name="dir"/>
    2.30              <sequential>
    2.31                  <nbjpdareload>
    2.32 -                    <fileset dir="@{dir}" includes="${fix.includes}*.class"/>
    2.33 +                    <fileset dir="@{dir}" includes="${fix.classes}">
    2.34 +                        <include name="${fix.includes}*.class"/>
    2.35 +                    </fileset>
    2.36                  </nbjpdareload>
    2.37              </sequential>
    2.38          </macrodef>
    2.39 @@ -253,6 +255,12 @@
    2.40          <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
    2.41              <istrue value="${have-jdk-older-than-1.4}"/>
    2.42          </condition>
    2.43 +        <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
    2.44 +            <os family="windows"/>
    2.45 +        </condition>
    2.46 +        <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
    2.47 +            <isset property="debug.transport"/>
    2.48 +        </condition>
    2.49      </target>
    2.50      <target depends="-init-debug-args" name="-init-macrodef-debug">
    2.51          <macrodef name="debug" uri="http://www.netbeans.org/ns/j2se-project/3">
    2.52 @@ -262,7 +270,7 @@
    2.53              <sequential>
    2.54                  <java classname="@{classname}" dir="${work.dir}" fork="true">
    2.55                      <jvmarg line="${debug-args-line}"/>
    2.56 -                    <jvmarg value="-Xrunjdwp:transport=dt_socket,address=${jpda.address}"/>
    2.57 +                    <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
    2.58                      <jvmarg line="${run.jvmargs}"/>
    2.59                      <classpath>
    2.60                          <path path="@{classpath}"/>
    2.61 @@ -309,6 +317,13 @@
    2.62                  ===================
    2.63              -->
    2.64      <target depends="init" name="deps-jar" unless="no.deps"/>
    2.65 +    <target depends="init,-check-automatic-build,-clean-after-automatic-build" name="-verify-automatic-build"/>
    2.66 +    <target depends="init" name="-check-automatic-build">
    2.67 +        <available file="${build.classes.dir}/.netbeans_automatic_build" property="netbeans.automatic.build"/>
    2.68 +    </target>
    2.69 +    <target depends="init" if="netbeans.automatic.build" name="-clean-after-automatic-build">
    2.70 +        <antcall target="clean"/>
    2.71 +    </target>
    2.72      <target depends="init,deps-jar" name="-pre-pre-compile">
    2.73          <mkdir dir="${build.classes.dir}"/>
    2.74      </target>
    2.75 @@ -329,7 +344,7 @@
    2.76          <!-- Empty placeholder for easier customization. -->
    2.77          <!-- You can override this target in the ../build.xml file. -->
    2.78      </target>
    2.79 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
    2.80 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile,-do-compile,-post-compile" description="Compile project." name="compile"/>
    2.81      <target name="-pre-compile-single">
    2.82          <!-- Empty placeholder for easier customization. -->
    2.83          <!-- You can override this target in the ../build.xml file. -->
    2.84 @@ -343,7 +358,7 @@
    2.85          <!-- Empty placeholder for easier customization. -->
    2.86          <!-- You can override this target in the ../build.xml file. -->
    2.87      </target>
    2.88 -    <target depends="init,deps-jar,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
    2.89 +    <target depends="init,deps-jar,-verify-automatic-build,-pre-pre-compile,-pre-compile-single,-do-compile-single,-post-compile-single" name="compile-single"/>
    2.90      <!--
    2.91                  ====================
    2.92                  JAR BUILDING SECTION
     3.1 --- a/samples/gc/nbproject/genfiles.properties	Fri Aug 29 15:44:59 2008 +0200
     3.2 +++ b/samples/gc/nbproject/genfiles.properties	Wed Oct 15 21:22:54 2008 +0200
     3.3 @@ -1,8 +1,8 @@
     3.4  build.xml.data.CRC32=70895030
     3.5 -build.xml.script.CRC32=68c5d084
     3.6 -build.xml.stylesheet.CRC32=be360661
     3.7 +build.xml.script.CRC32=f3a373d9
     3.8 +build.xml.stylesheet.CRC32=958a1d3e
     3.9  # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
    3.10  # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
    3.11  nbproject/build-impl.xml.data.CRC32=70895030
    3.12 -nbproject/build-impl.xml.script.CRC32=0f2f8102
    3.13 -nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08
    3.14 +nbproject/build-impl.xml.script.CRC32=84e24199
    3.15 +nbproject/build-impl.xml.stylesheet.CRC32=e55b27f5