3 # This script generate metrics html pages for either compile times or
7 # Parse the build.txt file from an autobuild that was generated with the
8 # g++_metric.sh script, e.g., with CXX=g++_metric.sh which outputs
9 # compile times on a per object basis, and use the data to generate time
10 # series graphs with gnuplot.
13 # Parse the build.txt file and and the *.map files, generated with LDFLAGS
14 # set to =-Xlinker -M -Xlinker -Map -Xlinker \$@.map and static_libs_only=1.
16 # For use with an autobuild, place a line something like this in the xml file,
17 # after the log file is closed, but before it's moved.
19 # <command name="shell" options="$ACE_ROOT/bin/generate_compile_stats.sh <path>/build.txt <destination> Footprint" />
22 ###############################################################################
26 ###############################################################################
29 echo "Usage: `basename $0` [--base=<dir>] [--name=<name>] [--compiler=compiler]"
30 echo " <input_file> <destination_directory> [target_file]"
31 echo " [Footprint|Compilation] [<date>] [<fudge_factor>]"
33 echo "--base This option can be used to set the base root directory to"
34 echo " something other than the default \$ACE_ROOT."
35 echo "--name This option can be used to set the software title to something"
36 echo " other than the default ACE+TAO+CIAO+DAnCE."
37 echo "--compiler This option can be used to set the compiler to something"
38 echo " other than the default gcc."
39 echo "input_file This is the compilation log file."
40 echo "destination_directory This designates the location of the generated html."
41 echo "target_file This is similar to input_file, but should contain no errors."
42 echo "date Set the date used in all generated html pages."
43 echo "fudge_factor Add the specified number of seconds to the compilation time"
44 echo " for each target."
46 echo "Options must be specified in the order shown above."
50 ###############################################################################
54 # this only works for english
55 # assumes the date is formatted like this: Sat Apr 12 18:19:31 UTC 2003
56 # and outputs this: 2003/04/12-18:19
58 ###############################################################################
61 # todo: add a format parameter
72 for token
in "${line[@]}"; do
73 #echo "$INDEX = $token"
76 Jan
) PT_MONTH
="01" ;;
77 Feb
) PT_MONTH
="02" ;;
78 Mar
) PT_MONTH
="03" ;;
79 Apr
) PT_MONTH
="04" ;;
80 May
) PT_MONTH
="05" ;;
81 Jun
) PT_MONTH
="06" ;;
82 Jul
) PT_MONTH
="07" ;;
83 Aug
) PT_MONTH
="08" ;;
84 Sep
) PT_MONTH
="09" ;;
85 Oct
) PT_MONTH
="10" ;;
86 Nov
) PT_MONTH
="11" ;;
87 Dec
) PT_MONTH
="12" ;;
89 2 ) PT_DAY
="$token" ;;
90 3 ) PT_HOUR
="${token%%:*}"
91 PT_MINUTE
="${token%:*}"
92 PT_MINUTE
="${PT_MINUTE#*:}"
93 PT_SECOND
="${token##*:}" ;;
94 4 ) PT_TIMEZONE
="$token" ;;
95 5 ) PT_YEAR
="$token" ;;
99 if [ "$1" = "debug" ]; then
100 echo "month = $PT_MONTH"
102 echo "year = $PT_YEAR"
103 echo "hour = $PT_HOUR"
104 echo "min = $PT_MINUTE"
105 echo "sec = $PT_SECOND"
106 echo "tz = $PT_TIMEZONE"
108 echo "$PT_YEAR/$PT_MONTH/$PT_DAY-$PT_HOUR:$PT_MINUTE"
111 ###############################################################################
115 # grab date from line with following format:
116 # ################### End [Fri Apr 11 00:18:31 2003 UTC]
117 # and return it in this format: Fri Apr 11 00:18:31 UTC 2003 which is
118 # what parse_time() expects
120 ###############################################################################
127 for token
in "${line[@]}"; do
128 #echo "$INDEX = $token"
130 2 ) DATE
=${token#[} ;;
131 7 ) DATE
="$DATE ${token%]} $TEMP_DATE" ;;
132 # this is a hack since the autobuild scripts don't format the date
134 6 ) TEMP_DATE
=$token ;;
135 * ) DATE
="$DATE $token" ;;
142 ###############################################################################
146 # Parse the commandline and validate the inputs
148 ###############################################################################
152 while [ $# -gt 1 ]; do
153 if [ -n "`echo $1 | grep '^--base=.*'`" ]; then
154 BASE_ROOT
=`echo $1 | sed 's/^--base=//'`
156 elif [ -n "`echo $1 | grep '^--name=.*'`" ]; then
157 BASE_TITLE
=`echo $1 | sed 's/^--name=//'`
159 elif [ -n "`echo $1 | grep '^--compiler.*'`" ]; then
160 COMPILER
=`echo $1 | sed 's/^--compiler=//'`
167 # set input file and destination (required)
168 if [ $# -gt 1 ]; then
172 if ! [ -e "$INFILE" ]; then
173 echo "input_file $INFILE does not exist."
180 # set the target file from command line
181 if [ $# -gt 2 ]; then
187 # set type of metric from command line
188 if [ $# -gt 3 ]; then
193 echo "metric = ($METRIC)"
195 # set the date from command line
196 if [ $# -gt 4 ]; then
199 DATE
=`tail -n 1 $INFILE | strip_date | parse_time`
201 echo "date = ($DATE)"
203 # set fudge factor from commandline (for testing)
204 if [ $# -gt 5 ]; then
211 ###############################################################################
215 # Generate the actual charts and move them to ${DEST}
217 ###############################################################################
224 local YLABEL
="Compile Time (Seconds)"
229 if [ "$TYPE" = "Footprint" ]; then
231 if [ ${high} -gt 1024 ]; then
232 YLABEL
="Footprint (KBytes)"
235 YLABEL
="Footprint (Bytes)"
240 let low
="${low}/${FACTOR}"
241 let high
="${high}/${FACTOR}"
243 sort -t'/' -k1n -k2n -k3n ${DEST}/data/${object}.${EXT} |
grep -E ^
2 > tmp.txt
249 set timefmt "%Y/%m/%d-%H:%M"
250 set format x "%Y/%m/%d"
252 set xlabel 'Date (YYYY/MM/DD)' 0,-3
253 set ylabel "${YLABEL}"
254 set terminal png small size 1024,768 color
256 set output "${DEST}/images/${object}_${TYPE}.png"
257 set title "${object//___//}"
258 plot 'tmp.txt' using 1:(\$2/$FACTOR) notitle w points, 'tmp.txt' using 1:(\$2/$FACTOR) notitle w l lt 3 lw 4
262 # here's how to reduce the scale
263 # plot '$1' using 1:(\$2/1024.0) title '$3' w l
266 ###############################################################################
270 # Make sure hidden directory tree exists, and create it if it doesn't
272 ###############################################################################
275 echo "create_dirs() '$1'"
276 if ! [ -d "${1}" ]; then
279 if ! [ -d "${1}data" ]; then
282 if ! [ -d "${1}images" ]; then
287 ###############################################################################
291 # Process the the $INPUT file
293 ###############################################################################
296 echo "process_file()"
299 local CURRENT_OBJECT
=""
300 local CURRENT_PATH
=""
304 while read target usertime systemtime
; do
307 CURRENT_PATH
=${target%/*}
309 # strip off the hidden directory if needbe
310 CURRENT_PATH
=${CURRENT_PATH%/.*}
312 # replace all "/" with "___"
313 # (so we can keep them all in the same directory)
314 CURRENT_PATH
=${CURRENT_PATH//\//___}
316 # strip path off of target
317 CURRENT_OBJECT
=${CURRENT_PATH}___
${target##*/}
318 #echo "target = $target, object = $CURRENT_OBJECT, path = $CURRENT_PATH"
319 #echo "usertime = $usertime, systemtime = $systemtime"
321 let seconds
="${usertime%.*}+${systemtime%.*}"
323 # it's just easier to grab the values first, since .0n causes problems...
324 userdec
="${usertime#*.}"
326 systemdec
="${systemtime#*.}"
327 systemdec
=${systemdec#0}
328 let hundreths
="${userdec}+${systemdec}"
330 let CURRENT_TIME
="(${seconds}*100 + ${hundreths})+$FUDGE_FACTOR"
331 echo $DATE $CURRENT_TIME >> ${DEST}/data
/${CURRENT_OBJECT}.txt
336 ###############################################################################
340 ###############################################################################
344 local BASE_OBJ_FLAG
=0
351 while read -a line
; do
355 for i
in "${line[@]}"; do
356 if [ $DIR_LINE -eq 1 ]; then
358 # only process when entering a directory
359 if [ $INDEX -eq 1 ] && [ "$i" = "Leaving" ]; then
364 if [ $INDEX -eq 3 ]; then
365 DIR
="${i%?}" # strip off last "'"
366 DIR
="${DIR#*$BASE_ROOT/}" # strip off $BASE_ROOT
367 DIR
="${DIR//\//___}___" # replace "/" with "___"
375 # if it was a "make" line then continue to the next token which will
376 # continue to process above
377 if [ "${i%[*}" = "make" ] ||
[ "${i%:*}" = "make" ]; then
384 # not an "make" line, so process it here.
385 if [ $BASE_OBJ_FLAG -eq 1 ]; then
386 BASE_OBJ
="${DIR}${i##.*/}"
387 # strip off lib numbers
388 if [ "$BASE_OBJ" != "${BASE_OBJ%.so.*}" ]; then
389 BASE_OBJ
=${BASE_OBJ%.so.*}.so
392 elif [ "$i" = "-o" ]; then
393 # found our base object, set flag so we can grab the next one
395 elif [ "$i" = "${i#-}" -a "$i" = "${i#/}" -a "$i" != "${i%.o}" ]; then
396 OBJ_LIST
="$OBJ_LIST ${DIR}${i##*/}"
400 if [ $FOUND_OBJ -eq 1 ]; then
401 echo "$BASE_OBJ : $OBJ_LIST"
409 ###############################################################################
411 # create_composite_list
413 ###############################################################################
414 create_composite_list
()
416 echo "create_composite_list()"
419 # create a pattern file
420 echo "\-L" > ${DEST}/comp_match.txt
421 echo "Entering directory" >> ${DEST}/comp_match.txt
423 # grep out the entering directory line and all the link lines,
424 # but only keep entering directory lines preceeding link lines.
425 cat $INFILE |
grep -f ${DEST}/comp_match.txt |
grep -B1 "\-L" \
426 |
grep -ve "--" | composite_list
> ${DEST}/composites.txt
429 ###############################################################################
433 ###############################################################################
437 local BASE_OBJ_FLAG
=0
444 while read -a line
; do
447 for i
in "${line[@]}"; do
448 if [ $DIR_LINE -eq 1 ]; then
449 if [ $INDEX -eq 3 ]; then
450 DIR
="${i%?}" # strip off last "'"
451 DIR
="${DIR#*$BASE_ROOT/}" # strip off $BASE_ROOT
452 DIR
="${DIR//\//___}___" # replace "/" with "___"
460 # if it was a "make" line then continue to the next token which will
461 # continue to process above
462 if [ "${i%[*}" = "make" ]; then
468 # not a "make" line, so process it here. We are interested in the
469 # 3rd, and last, token, i.e., lib*.a
471 if [ $INDEX -eq 3 ]; then
478 ###############################################################################
480 # create_library_list
482 ###############################################################################
483 create_library_list
()
485 echo "create_library_list()"
488 # create a pattern file
489 echo "chmod" > ${DEST}/lib_match.txt
490 echo "Entering directory" >> ${DEST}/lib_match.txt
492 # grep out the entering directory line and all the link lines,
493 # but only keep entering directory lines preceeding link lines.
494 cat $INFILE |
grep -f ${DEST}/lib_match.txt |
grep -B1 "chmod" \
495 |
grep -ve "--" | library_list
> ${DEST}/libraries.txt
498 ###############################################################################
500 # rollup_compile_times
502 ###############################################################################
503 rollup_compile_times
()
505 echo "process_composite_objects()"
510 local lpath
="${DEST}/data/"
512 # rollup compile times
513 while read outfile colon infiles
; do
514 #echo "$outfile ----- $infiles"
515 for i
in $infiles; do
516 temp
=`head -n 1 ${lpath}${i}.txt`
518 let ttime
="${temp##* }"
520 if [ "$tdate" = "$DATE" ]; then
521 let TOTAL_TIME
="$TOTAL_TIME + ${ttime}"
524 echo "$DATE $TOTAL_TIME" >> ${lpath}${outfile}.txt
529 ###############################################################################
533 ###############################################################################
539 local lpath
="${DEST}/data/"
543 # Remove the old size_composites.txt and create a new one since
544 # we have all the info we need from the size command on a library.
545 if [ "$TYPE" = "LIB" ] && [ -e ${DEST}/size_composites.txt
]; then
546 rm ${DEST}/size_composites.txt
549 # go through all the targets and get the sizes of the target and
550 # each dependent object and write it to a *.size file.
551 while read outfile colon infiles
; do
552 # reconstitue file name
553 FILE
="$BASE_ROOT/${outfile//___//}"
555 if [ -e $FILE ]; then
557 SIZE
=`size $FILE | grep -v text | awk '{s += \$4} END {print s}'`
558 echo "$DATE $SIZE" >> $lpath/${outfile}.size
560 # only process the included objects if it's a library
561 if [ "$TYPE" = "LIB" ]; then
563 # now, do the same for all the objects in the file (if any)
566 awk '{print $4 " : " $6}' | process_included
$fpath $lpath $FILE
573 ###############################################################################
577 ###############################################################################
580 echo "process_included()"
587 # while we are here, and have the info, go ahead and write out
588 # size dependencies for each library.
589 LIBRARY
="${LIBRARY#*$BASE_ROOT/}" # strip off $BASE_ROOT
590 LIBRARY
="${LIBRARY//\//___}" # replace "/" with "___"
591 echo -n "$LIBRARY : " >> ${DEST}/size_composites.txt
593 while read size colon
file; do
595 OUTFILE
="${FILE#*$BASE_ROOT/}" # strip off $BASE_ROOT
596 OUTFILE
="${OUTFILE//\//___}" # replace "/" with "___"
597 #echo "size = ($size)"
598 echo "$DATE $size" >> $lpath/${OUTFILE}.size
601 echo -n "$OUTFILE " >> ${DEST}/size_composites.txt
605 echo "" >> ${DEST}/size_composites.txt
609 ###############################################################################
613 ###############################################################################
616 # this is way too noisy...
617 #echo "process_map_file()"
622 # Read in the map file. The first section is all we are interested
623 # in right now. As soon as we see "Memory Configuration" we are done.
626 # Skip the first 2 lines, then read in all the odd lines, they are the
627 # objects that must be loaded. The following line, even lines, is the
628 # object that caused it to be loaded.
629 if [ $index -lt 3 ] ||
[ "$line" = "" ]; then
633 # The line looks like this:
634 #/ace_root_path/ace/libACE.a(Malloc.o)
635 # need to find the real library path, since these libs will
636 # always be in ace/, but the objects will be in the original
638 lib
="${line##/*/}" # strip off path, but only if it starts a line
639 lib
="${lib%%.a*}" # strip off rest of line
640 lib
="$lib.a" # put back the .a to make it unambiguous
641 libpath
=`grep $lib ${DEST}/libraries.txt`
642 path
="${libpath%___lib*}" # strip off libname
643 FILE
="${line#*(}" # strip off everything up to object name
644 FILE
="${FILE%%)*}" # strip off rest of line
645 FILE
="${path}___${FILE}"
646 echo -n "$FILE " >> ${DEST}/size_composites.txt
649 echo "" >> ${DEST}/size_composites.txt
653 ###############################################################################
655 # create_size_composites
657 ###############################################################################
658 create_size_composites
()
660 echo "create_size_composites()"
663 while read outfile colon infiles
; do
664 # reconstitue file name
665 FILE
="$BASE_ROOT/${outfile//___//}.map"
666 if [ -e $FILE ]; then
667 echo -n "$outfile : " >> ${DEST}/size_composites.txt
668 # only process lines that don't begin with a space
669 cat $FILE |
sed -e '/Memory Configuration/,$d' \
670 |
sed -e '/Allocating common symbols/,$d' \
671 |
grep -v "^ " | process_map_file
$FILE
678 ###############################################################################
682 ###############################################################################
685 echo "create_images()"
694 while read object
; do
695 if [ -e $object ] && [ `sort -t'/' -k1n -k2n -k3n $object | grep -E ^2 | tail -n 1 | cut -d' ' -f2` ]; then
696 let TMP
=`sort -t'/' -k1n -k2n -k3n $object | grep -E ^2 | tail -n 1 | cut -d' ' -f2`
700 while [ $HIGH -eq 0 ]; do
701 if [ $TMP -lt $STEP ]; then
707 if [ "$TYPE" = "Footprint" ]; then
708 object
="${object%.size}"
710 object
="${object%.txt}"
713 gen_chart
"${object##*/}" ${DEST} ${TYPE} ${LOW} ${HIGH} >/dev/null 2>&1
719 ###############################################################################
723 ###############################################################################
727 local TITLE="$TYPE metrics
for $BASE_TITLE"
730 echo "<head><title
>$TITLE</title
></head>"
732 echo 'body,td,a,p,.h{font-family:arial,sans-serif;}'
733 echo '.h{font-size: 20px;}'
734 echo '.q{text-decoration:none; color:#0000cc;}'
737 echo '<body text = "#000000" link="#000fff" vlink="#ff0f0f" bgcolor="#ffffff">'
738 echo "<br><center><h1>$TITLE</h1></center><br><hr>"
739 if [ $BASE_TITLE = $DEFAULT_TITLE ]; then
740 echo '<p>We are measuring ACE+TAO+CIAO+DAnCE metrics daily.'
744 echo ' Metrics are gathered nightly on all
745 objects in the '$BASE_TITLE' distribution and displayed here.'
747 if [ $BASE_TITLE = $DEFAULT_TITLE ]; then
748 echo "<li><a href=\"ace_${TYPE}.html\">ACE</a>"
749 echo "<li><a href=\"tao_${TYPE}.html\">TAO</a>"
750 echo "<li><a href=\"ciao_${TYPE}.html\">CIAO</a>"
751 echo "<li><a href=\"dance_${TYPE}.html\">DAnCE</a>"
753 echo "<li><a href=\"all_${TYPE}.html\">ALL</a>"
758 echo '<P>All the experiments run on the system described below. '
759 echo 'The machine is running Linux ('
761 if [ -e "/etc/SuSE-release" ]; then
762 cat /etc
/SuSE-release
765 if [ -e "/etc/redhat-release" ]; then
766 cat /etc
/redhat-release
769 echo "), and we use " $COMPILER " version "
771 $COMPILER -dumpversion > ${DEST}/compilerversion.txt
2>&1
772 cat ${DEST}/compilerversion.txt
774 echo ' to compile '$BASE_TITLE'. </P>'
776 if [ -z "$MPC_ROOT" ]; then
777 MPC_ROOT
=$ACE_ROOT/MPC
780 CFG_FILES
=$ACE_ROOT/ace
/config.h
781 if [ -r $ACE_ROOT/bin
/MakeProjectCreator
/config
/default.features
]; then
782 CFG_FILES
="$CFG_FILES $ACE_ROOT/bin/MakeProjectCreator/config/default.features"
783 elif [ -r $MPC_ROOT/config
/default.features
]; then
784 CFG_FILES
="$CFG_FILES $MPC_ROOT/config/default.features"
786 CFG_FILES
="$CFG_FILES $ACE_ROOT/include/makeinclude/platform_macros.GNU"
788 echo '<TABLE border="2"><TBODY>'
789 for cfg_file
in $CFG_FILES; do
790 if [ -r $cfg_file ]; then
791 echo "<TR><TD>ACE+TAO+CIAO+DAnCE Configuration</TD><TD>`basename $cfg_file`</TD></TR>"
792 echo '<TR><TD colspan="2"><PRE>'
794 echo '</PRE></TD></TR>'
798 echo '<TR><TD>CPU Information</TD><TD>/proc/cpuinfo</TD></TR>'
799 echo '<TR><TD colspan="2"><PRE>'
803 echo '</PRE></TD></TR><TR><TD>Available Memory</TD><TD>/proc/meminfo</TD></TR>'
804 echo '<TR><TD colspan="2"><PRE>'
808 echo '</PRE></TD></TR><TR><TD>OS Version</TD><TD>uname -a</TD></TR>'
809 echo '<TR><TD colspan="2"><PRE>'
813 echo '</PRE></TD></TR><TR><TD>Compiler Version</TD><TD>'$COMPILER' -v</TD></TR>'
814 echo '<TR><TD colspan="2">'
816 $COMPILER -v > ${DEST}/compiler.txt
2>&1
817 cat ${DEST}/compiler.txt
819 if [ -e "/lib/libc.so.6" ]; then
820 echo '</TD></TR><TR><TD>Library Version</TD><TD>/lib/libc.so.6</TD></TR>'
821 echo '<TR><TD colspan="2"><PRE>'
823 /lib
/libc.so
.6 |
sed -e 's/</\</g' -e 's/>/\>/g'
826 echo '</PRE></TD></TR></TBODY></TABLE>'
827 echo '</body></html>'
830 ###############################################################################
834 ###############################################################################
837 # always strip off "ACE___" / "TAO___" / "CIAO___"
841 local BASE_NAME
=${BASE#ACE___}
842 local BASE_NAME
=${BASE#TAO___}
843 local BASE_NAME
=${BASE#CIAO___}
844 local BASE_NAME
=${BASE#DAnCE___}
845 local TITLE
="${TYPE} metrics for ${BASE_NAME//___//}"
847 if [ "$TYPE" = "Compilation" ]; then
849 UNITS
="100th's of seconds"
857 echo "<head><title>$TITLE</title></head>"
859 echo 'body,td,a,p,.h{font-family:arial,sans-serif;}'
860 echo '.h{font-size: 20px;}'
861 echo '.q{text-decoration:none; color:#0000cc;}'
864 echo '<body text = "#000000" link="#000fff" vlink="#ff0f0f" bgcolor="#ffffff">'
865 echo "<br><center><h1>$TITLE</h1></center><br>"
866 if [ -e "${DEST}/images/${BASE}_${TYPE}.png" ]; then
867 echo '<DIV align="center"><P>'
868 echo "<IMG alt=\"$BASE\" border=0 src=\"images/${BASE}_${TYPE}.png\""
869 echo 'width="800" height="600"></P></DIV>'
873 echo "<center><h2>Detail (${DATE})</h2></center>"
875 echo '<TABLE border="2"><TBODY><TR><TD rowspan=2><b>Object</b></TD>'
876 echo '<TD colspan="4" align=center><b>Last Compile</b></TD></TR>'
877 echo "<TR><TD align=center><b>Date</b></TD><TD align=center><b>$UNITS</b></TD>"
878 echo '<TD align=center><b>%chg</b></TD><TD align=center><b>Data</b></TD></TR>'
880 if [ -e "${DEST}/data/${i}.${EXT}" ]; then
881 LAST
=0 PRE
=0 VAL_TMP
=0 VAL_INT
=0 VAL_SIGN
="+"
883 if [ -e "${DEST}/${i}_${TYPE}.html" ]; then
884 # strip off "ACE___" if it exists
886 # strip off "TAO___" if it exists
888 # strip off "CIAO___" if it exists
890 # strip off "DAnCE___" if it exists
892 echo "<a href=\"${i}_${TYPE}.html\">${NAME//___//}</a>"
893 elif [ -e "${DEST}/images/${i}_${TYPE}.png" ]; then
894 # since you'll only have images if it's a composite, strip off the
896 if [ "$TYPE" = "Footprint" ]; then
897 # if we are doing footprint, add library
898 llib
=`grep -e "lib.*\.a" ${DEST}/size_composites.txt | grep ${i} | awk '{print $1}'`
901 llib
="${llib//___//}"
902 NAME
="${llib}(${i##*___})"
906 echo "<a href=\"images/${i}_${TYPE}.png\">${NAME}</a>"
911 echo `sort -t'/' -k1n -k2n -k3n ${DEST}/data/${i}.${EXT} | grep -E ^2 | tail -n1 | cut -d" " -f1`
912 let LAST
=`sort -t'/' -k1n -k2n -k3n ${DEST}/data/${i}.${EXT} | grep -E ^2 | tail -n1 | cut -d" " -f2`
913 echo "</TD><TD align=right>$LAST</TD>"
914 let PRE
=`sort -t'/' -k1n -k2n -k3n ${DEST}/data/${i}.${EXT} | grep -E ^2 | tail -n2 | head -n1 | cut -d" " -f2`
915 let VAL_TMP
="((($LAST+1)-($PRE+1))*1000)/($PRE+1)"
916 if [ $VAL_TMP -lt 0 ]; then
918 let VAL_TMP
="-1*$VAL_TMP"
919 elif [ $VAL_TMP -eq 0 ]; then
922 let VAL_INT
="$VAL_TMP/10"
923 let VAL_TENTH
="$VAL_TMP-($VAL_INT*10)"
924 echo "<TD align=right>${VAL_SIGN}${VAL_INT}.${VAL_TENTH}</TD>"
925 echo "<TD align=right><a href=\"data/${i}.${EXT}\">Data</a></TD>"
932 echo "</TD><TD align=right>?</TD>"
933 echo "<TD align=right>?</TD><TD align=right>?</TD></TR>"
936 echo '</TBODY></TABLE>'
939 echo '</body></html>'
943 ###############################################################################
947 ###############################################################################
950 # sort the dependency files
951 if [ -e ${DEST}/tmp_list
]; then
955 touch ${DEST}/tmp_list
957 echo "$i" >> ${DEST}/tmp_list
961 sort -f ${DEST}/tmp_list
964 ###############################################################################
968 ###############################################################################
981 while read base colon files
; do
982 # create individual page for app/lib
984 sort_list
${files} | create_page ${base} ${TYPE} \
985 > ${DEST}/${base}_${TYPE}.html
986 if [ "${base}" != "${base#DAnCE}" ]; then
987 DAnCE_OBJS
="${DAnCE_OBJS} ${base}"
988 elif [ "${base}" != "${base#CIAO}" ]; then
989 CIAO_OBJS
="${CIAO_OBJS} ${base}"
990 elif [ "${base}" != "${base#TAO}" ]; then
991 TAO_OBJS
="${TAO_OBJS} ${base}"
992 elif [ "${base}" != "${base#ACE}" ]; then
993 ACE_OBJS
="${ACE_OBJS} ${base}"
995 ALL_OBJS
="${ALL_OBJS} ${base}"
999 create_index_page
${TYPE} > ${DEST}/index.html
1001 if [ "${TYPE}" = "Compilation" ] ||
[ "${TYPE}" = "Footprint" ]; then
1002 if [ $BASE_TITLE = $DEFAULT_TITLE ]; then
1003 name
="ace_${TYPE}.html"
1004 sort_list
${ACE_OBJS} | create_page "ACE" ${TYPE} > ${DEST}/${name}
1006 name
="tao_${TYPE}.html"
1007 sort_list
${TAO_OBJS} | create_page "TAO" ${TYPE} > ${DEST}/${name}
1009 name
="ciao_${TYPE}.html"
1010 sort_list
${CIAO_OBJS} | create_page "CIAO" ${TYPE} > ${DEST}/${name}
1012 name
="dance_${TYPE}.html"
1013 sort_list
${DAnCE_OBJS} | create_page "DAnCE" ${TYPE} > ${DEST}/${name}
1015 name
="all_${TYPE}.html"
1016 sort_list
${ALL_OBJS} | create_page $BASE_TITLE ${TYPE} > ${DEST}/${name}
1021 ###############################################################################
1025 ###############################################################################
1031 METRIC
="Compilation"
1034 DEFAULT_TITLE
=ACE
+TAO
+CIAO
+DAnCE
1035 BASE_TITLE
=$DEFAULT_TITLE
1039 create_dirs
"${DEST}/"
1040 create_dirs
"${DEST}/"
1042 if [ "$METRIC" = "Compilation" ]; then
1044 ########################################################
1047 # grab the compile time metrics for objects only and process them
1048 grep "compile time(0):" $INFILE |
grep "\.o" | cut
-d' ' -f3,4,5 | process_file
1050 # Create ${DEST}/composites.txt with entries like this:
1051 # tests___OS_Test : tests___OS_Test.o tests___Main.o
1052 create_composite_list
$TARGETS
1055 cat ${DEST}/composites.txt | rollup_compile_times
1056 find ${DEST}/data
/ -name "*.txt" | create_images
${DEST} "Compilation"
1057 cat ${DEST}/composites.txt | create_html
${DEST} "Compilation"
1059 elif [ "$METRIC" = "Footprint" ]; then
1061 ########################################################
1064 # Create ${DEST}/libraries.txt with entries like this:
1066 create_library_list
$TARGETS
1068 # Create ${DEST}/composites.txt with entries like this:
1069 # tests___OS_Test : tests___OS_Test.o tests___Main.o
1070 create_composite_list
$TARGETS
1072 # Run size on the executables and append results to *.size file.
1073 cat ${DEST}/composites.txt | footprint
1075 # Run size on the libraries and append results to *.size for the
1076 # library and each contained object.
1077 # It also creates ${DEST}/size_composites.txt based on size output for
1078 # libraries with entries like this:
1079 # ace___libACE.a : ace___ACE.o ace___Addr.o
1080 cat ${DEST}/libraries.txt | footprint LIB
1082 # Add executables to ${DEST}/size_composites.txt based on output
1083 # from the map files (created with LDFLAGS=-Xlinker -M -Xlinker
1084 # -Map -Xlinker $(@).map). Find the map files of we want based on
1085 # entries in ${DEST}/composites.txt.
1086 cat ${DEST}/composites.txt | create_size_composites
1088 find ${DEST}/data
/ -name "*.size" | create_images
${DEST} "Footprint"
1089 cat ${DEST}/size_composites.txt | create_html
${DEST} "Footprint"
1092 echo "metric type ($METRIC) not recognized"