Added stopwatch tasks through most of the code hit during a platform build.
authorSimon Howkins <simonh@symbian.org>
Thu, 28 Jan 2010 13:59:40 +0000
changeset 861 caa0601f50c5
parent 860 fbd25e274e6b
child 862 9202a9e0015c
Added stopwatch tasks through most of the code hit during a platform build.
common/build.postbuild.xml
common/build.xml
sf-platform/build.xml
--- a/common/build.postbuild.xml	Wed Jan 27 13:33:20 2010 +0000
+++ b/common/build.postbuild.xml	Thu Jan 28 13:59:40 2010 +0000
@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <project name="SF-POSTBUILD" xmlns:hlm="http://www.nokia.com/helium">
     <target name="sf-postbuild">
+        <stopwatch name="sf-postbuild"/>
         <echo>[SF-POSTBUILD]</echo>
         
         <if><istrue value="${sf.relicense.exported.headers}"/>
@@ -32,12 +33,14 @@
             <if>
                 <istrue value="${sf.spec.package.bin.enable}"/>
                 <then>
+                    <stopwatch name="sf-postbuild packaging binaries"/>
                     <echo message="INFO Packaging Binaries"/>
                     <runtarget target="sf-package-binary"/>
                     <runtarget target="sf-package-tools"/>
     
                     <echo message="INFO Validate Zip files"/>
                     <runtarget target="sf-package-validate"/>
+                    <stopwatch name="sf-postbuild packaging binaries" action="elapsed"/>
                 </then>
             </if>
             
@@ -54,10 +57,12 @@
         </parallel>
         
         <!-- Generate release_metadata entries for the md5 zips -->
+        <stopwatch name="sf-postbuild" action="elapsed"/>
         <antcall target="sf-zip-content">
             <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/>
             <param name="zip.target.name" value="bin-just-metadata" />
         </antcall>
+        <stopwatch name="sf-postbuild" action="elapsed"/>
  
         <!-- Launch smoketest -->
         <if><istrue value="${sf.spec.test.sendpkg.enable}"/>
@@ -92,6 +97,7 @@
                 <runtarget target="sf-publish"/>
             </then>
         </if>
+        <stopwatch name="sf-postbuild" action="elapsed"/>
     </target>
 
     <target name="sf-tag-hg-code">
@@ -332,6 +338,7 @@
 
     <!-- runs analysis of missing bins and source -->
     <target name="sf-run-analysis">
+        <stopwatch name="sf-run-analysis"/>
         <mkdir dir="${build.log.dir}/analysis"/>
         <parallel>
           <runtarget target="sf-run-analysis-ant"/>
@@ -346,6 +353,7 @@
             <runtarget target="sf-run-analysis-diamonds"/>
             </then>
         </if>
+        <stopwatch name="sf-run-analysis" action="elapsed"/>
     </target>
 
     <target name="sf-run-analysis-ant">    
--- a/common/build.xml	Wed Jan 27 13:33:20 2010 +0000
+++ b/common/build.xml	Thu Jan 28 13:59:40 2010 +0000
@@ -89,8 +89,7 @@
         </else>
     </if>
     
-    <target name="sf-prep" depends="prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
-        <echo>[SF-PREP]</echo>
+    <target name="sf-prep" depends="sf-prep-announce,prep-drive,init-build-area,check-tool-dependencies,create-bom,log-build-env">
         <!-- Test for the disk space we would like for this build -->
 	<fail>
             <condition>
@@ -107,8 +106,14 @@
         <tempfile property="prep.dynamic.config" suffix="ant.xml" destdir="${temp.build.dir}"/>
 
         <runtarget target="sf-check-env"/>
+        <stopwatch name="sf-prep" action="elapsed"/>
     </target>
-        
+
+    <target name="sf-prep-announce">    
+        <stopwatch name="sf-prep"/>
+        <echo>[SF-PREP]</echo>
+    </target>
+
     <target name="sf-check-env">
         <!-- Conditional location of BuildEnv.xml. Project always preferred to default -->
         <if><available file="${sf.project.location}/BuildEnv.xml"/>        
@@ -235,9 +240,12 @@
     </target>
 
     <target name="sf-prebuild" depends="sf-prep,sf-prebuild-noprep"/>
-    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-tag-build,sf-getenvs,sf-syncsource,sf-diamondize-bom"/>
+    <target name="sf-prebuild-noprep" depends="sf-prebuild-announce,sf-diamonds-connect,sf-diamonds-tag-build,sf-getenvs,sf-syncsource,sf-diamondize-bom">
+        <stopwatch name="sf-prebuild" action="elapsed"/>
+    </target>
     
     <target name="sf-prebuild-announce">
+        <stopwatch name="sf-prebuild"/>
         <echo>[SF-PREBUILD]</echo>
     </target>
     
@@ -297,6 +305,7 @@
     </target>
 
     <target name="sf-getenvs">
+        <stopwatch name="sf-getenvs"/>
         <!-- create BOM dir -->
         <mkdir dir="${build.drive}/output/logs/BOM"/>
         
@@ -305,6 +314,7 @@
         <if>
             <istrue value="${sf.spec.toolsbaseline.enable}" />
             <then>
+                <stopwatch name="sf-getenvs (tools)"/>
 
                 <!-- record toolsbaseline information in BOM file -->
                 <echo message="${sf.spec.toolsbaseline.location}" file="${build.drive}/output/logs/BOM/toolsbaseline.txt"/>
@@ -317,6 +327,7 @@
                     <arg value="${sf.common.config.dir}/tools/listdir.pl"/>
                     <arg value="${build.drive}/epoc32"/>
                 </exec>
+                <stopwatch name="sf-getenvs (tools)" action="elapsed"/>
             </then>
         </if>        
 
@@ -324,13 +335,16 @@
         <if>
             <istrue value="${sf.spec.baseline.enable}" />
             <then>
+                <stopwatch name="sf-getenvs (baseline)"/>
                 <!-- record baseline information in BOM file -->
                 <echo message="${sf.spec.baseline.location}" file="${build.drive}/output/logs/BOM/baseline.txt"/>
                 
                 <!-- run internal target preparation-getenv -->
                 <runtarget target="preparation-getenv"/>
+                <stopwatch name="sf-getenvs (baseline)" action="elapsed"/>
             </then>
         </if>
+        <stopwatch name="sf-getenvs" action="elapsed"/>
     </target>
 
     <target name="sf-getenv-tools">
@@ -341,6 +355,7 @@
     </target>
 
     <target name="sf-syncsource">
+        <stopwatch name="sf-syncsource"/>
         <touch file="${build.log.dir}/BOM/sources.csv"/> 
         <if>
             <istrue value="${sf.spec.sourcesync.enable}" />
@@ -350,6 +365,7 @@
                 <runtarget target="sf-unpack-rnd"/>
             </then>
         </if>        
+        <stopwatch name="sf-syncsource" action="elapsed"/>
     </target>
 
     <!-- generate dir list using passed location and name 
@@ -411,7 +427,7 @@
     </target>
 
     <!-- This target is overridden in platform builds, but used directly in package builds -->
-    <target name="sf-build-noprep" depends="sf-truclean,sf-model-from-project,sf-compile,sf-postbuild">
+    <target name="sf-build-noprep" depends="sf-truclean,sf-model-from-project,sf-compile">
         <echo>[SF-BUILD-NOPREP]</echo>
     </target>
     
@@ -420,6 +436,7 @@
     </target>
     
   <target name="sf-truclean">
+    <stopwatch name="sf-truclean"/>
     <if>
       <istrue value="${sf.spec.build.clean.enable}"/>
       <then>
@@ -437,9 +454,11 @@
         <echo message="Skipping truclean step."/>
       </else>
     </if>
+    <stopwatch name="sf-truclean" action="elapsed"/>
   </target>
   
   <target name="sf-model-from-project">
+    <stopwatch name="sf-model-from-project"/>
     <if>
       <isset property="sf.spec.systemdefinition.source"/>
       <then>
@@ -457,6 +476,7 @@
         </exec>
       </else>
     </if>
+    <stopwatch name="sf-model-from-project" action="elapsed"/>
   </target>
     
     <target name="sf-get-source" depends="sf-generate-source-spec">
--- a/sf-platform/build.xml	Wed Jan 27 13:33:20 2010 +0000
+++ b/sf-platform/build.xml	Thu Jan 28 13:59:40 2010 +0000
@@ -17,7 +17,7 @@
    -->
 
   <!-- MattD - workaround until generating a model from package definitions works-->
-  <target name="sf-build-noprep" depends="sf-platform-bootstrap,sf-compile,sf-postbuild">
+  <target name="sf-build-noprep" depends="sf-platform-bootstrap,sf-compile">
     <echo>[SF-BUILD-NOPREP] (platform)</echo>
     <echo>[SF-BUILD-NOPREP] WARNING: Not generating model from packages</echo>
   </target>
@@ -129,26 +129,30 @@
     ==
     -->
   <target name="sf-compile">
+    <stopwatch name="sf-compile"/>
 
     <!-- TODO clean up to single target once genxml v2.0.0 merge is fixed -->
     <if><istrue value="${sf.spec.splitbuild}"/>
-       <then>
-       <if><istrue value="${sf.spec.os.skipbuild}" />
-            <then><echo message="Skipping OS build"/></then>
-       <else><runtarget target="sf-os-compile"/></else></if>
+      <then>
+        <if><istrue value="${sf.spec.os.skipbuild}" />
+          <then><echo message="Skipping OS build"/></then>
+          <else><runtarget target="sf-os-compile"/></else>
+        </if>
 
-       <if><istrue value="${sf.spec.s60.skipbuild}" />
-            <then><echo message="Skipping S60 build"/></then>
-       <else><runtarget target="sf-s60-compile"/></else></if>
-	   </then>
-	   <else>
-	        <!-- TODO targets for single sysdef build -->
-	        <runtarget target="sf-os-compile"/>
-	   </else>
+        <if><istrue value="${sf.spec.s60.skipbuild}" />
+          <then><echo message="Skipping S60 build"/></then>
+          <else><runtarget target="sf-s60-compile"/></else>
+        </if>
+      </then>
+      <else>
+        <!-- TODO targets for single sysdef build -->
+        <runtarget target="sf-os-compile"/>
+      </else>
     </if>
-       <!-- always run cenrep -->
-       <runtarget target="sf-s60-create-cenrep"/>
 
+    <!-- always run cenrep -->
+    <runtarget target="sf-s60-create-cenrep"/>
+    <stopwatch name="sf-compile" action="elapsed"/>
   </target>
 
   <!--