Return-Path: Delivered-To: apmail-stdcxx-commits-archive@www.apache.org Received: (qmail 26958 invoked from network); 14 Mar 2008 21:15:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Mar 2008 21:15:33 -0000 Received: (qmail 56282 invoked by uid 500); 14 Mar 2008 21:15:30 -0000 Delivered-To: apmail-stdcxx-commits-archive@stdcxx.apache.org Received: (qmail 56253 invoked by uid 500); 14 Mar 2008 21:15:30 -0000 Mailing-List: contact commits-help@stdcxx.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@stdcxx.apache.org Delivered-To: mailing list commits@stdcxx.apache.org Received: (qmail 56244 invoked by uid 99); 14 Mar 2008 21:15:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 14:15:30 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 14 Mar 2008 21:14:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id CA6751A9832; Fri, 14 Mar 2008 14:15:05 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r637269 - in /stdcxx/trunk/bin: xbuildgen xcomp.awk Date: Fri, 14 Mar 2008 21:15:05 -0000 To: commits@stdcxx.apache.org From: sebor@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080314211505.CA6751A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: sebor Date: Fri Mar 14 14:15:02 2008 New Revision: 637269 URL: http://svn.apache.org/viewvc?rev=637269&view=rev Log: 2008-03-14 Martin Sebor STDCXX-702 * xbuildgen: Moved all buildlog processing to... * xcomp.awk: ...here, improving the detection of platform details as well build start times and the numbers of diagnosics (broken down by library and all other components). Removed min, max, total, and average statistics from the Logs and Columns table. The size of the gzipped log is not being reported yet. Only builds where the configuration or library build stage failed are now highlighted in red (including on Windows). Modified: stdcxx/trunk/bin/xbuildgen stdcxx/trunk/bin/xcomp.awk Modified: stdcxx/trunk/bin/xbuildgen URL: http://svn.apache.org/viewvc/stdcxx/trunk/bin/xbuildgen?rev=637269&r1=637268&r2=637269&view=diff ============================================================================== --- stdcxx/trunk/bin/xbuildgen (original) +++ stdcxx/trunk/bin/xbuildgen Fri Mar 14 14:15:02 2008 @@ -20,7 +20,7 @@ # implied. See the License for the specific language governing # permissions and limitations under the License. # -# Copyright 2007 Rogue Wave Software, Inc. +# Copyright 2007 - 2008 Rogue Wave Software, Inc. # ######################################################################## # @@ -874,106 +874,6 @@ exit 2 fi - -cat <Logs and Columns -EOF - - -if [ $components_in_rows -ne 0 ]; then - cat <$timings_file - -

Timings

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -EOF - - cat < - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -EOF - -fi - - - ###################################################################### # expand gzipped logs and extract the relevant portion from each into # a smaller text file for fast and easy processing; the names of all @@ -985,39 +885,6 @@ # space-separated list of names of text logs processed in loop below textlogs="" -# the minimum, maximum, and the sum of library sizes -libsize_min=9999999999 -libsize_max=0 -libsize_sum=0 - -# the minimum, maximum, and the sum of compressed log sizes -gzlogsize_min=9999999999 -gzlogsize_max=0 -gzlogsize_sum=0 - -# the minimum, maximum, and the sum of uncompressed log sizes -txtlogsize_min=9999999999 -txtlogsize_max=0 -txtlogsize_sum=0 - -# the number of logs counted equals logcount (see above) - -# the minimum, maximum, and the sum of full build sizes -fullbuildsize_min=9999999999 -fullbuildsize_max=0 -fullbuildsize_sum=0 - -# the minimum, maximum, and the sum of clean build sizes -cleanbuildsize_min=9999999999 -cleanbuildsize_max=0 -cleanbuildsize_sum=0 - -# the number of build sizes counted -buildsize_count=0 - -# the number of successfully built (non-zero size) libraries -libcount=0 - for l in $gzlogs; do logcount=$((logcount + 1)) fname=`basename $l` @@ -1039,313 +906,7 @@ # continue processing the empty log below fi - - # determine the size of the compressed and decompressed log - gzlogsize=`wc -c $l` - gzlogsize=${gzlogsize% *} - - if [ $gzlogsize -lt $gzlogsize_min ]; then - gzlogsize_min=$gzlogsize - fi - - if [ $gzlogsize -gt $gzlogsize_max ]; then - gzlogsize_max=$gzlogsize - fi - - gzlogsize_sum=$((gzlogsize_sum + gzlogsize)) - - gzlogsize=`format_size $gzlogsize` - - txtlogsize=`wc -c $txtlog` - txtlogsize=${txtlogsize% *} - - if [ $txtlogsize -lt $txtlogsize_min ]; then - txtlogsize_min=$txtlogsize - fi - - if [ $txtlogsize -gt $txtlogsize_max ]; then - txtlogsize_max=$txtlogsize - fi - - txtlogsize_sum=$((txtlogsize_sum + txtlogsize)) - - txtlogsize=`format_size $txtlogsize` - - # extract the date and time the build started - # the date is expected to be introduced by a line like this: - # ### date: - date=`sed -n "/^### date:$/{n;p;q;}" $txtlog` - if [ "$date" = "" ]; then - echo "$myname: warning: unable to extract date from $l" >&2 - unset date - unset age - else - # compute the age of the build as the difference between - # the build date and now in days, or hours, or minutes, - # or just seconds, whichever happens to be the most - # significant - age=`$HOME/stdcxx/bin/duration "$date" "$today"` - full_age=`$HOME/stdcxx/bin/duration -f "$date" "$today"` - age="
$age
" - fi - - # strip the year from the date - date=`echo ${date% [1-9][0-9][0-9][0-9]}` - - # extract the size of the library binary from the build log - libsize=`get_lib_size $txtlog` - - if [ "$libsize" != "" ]; then - if [ $libsize -lt $libsize_min ]; then - libsize_min=$libsize - fi - - if [ $libsize -gt $libsize_max ]; then - libsize_max=$libsize - fi - - libsize_sum=$((libsize_sum + libsize)) - - libsize=`format_size $libsize` - libcount=$((libcount + 1)) - fi - - - # extract the size of the whole build introduced by a line - # containing the strings "# du -sk build", both before and - # afterit's been cleaned - buildsizes=` sed -n '/^##* *du *-sk *.*build/{n;p;}' \ - $txtlog | sed 's/ *\([1-9][0-9]*\).*/\1/'` - if [ "$buildsizes" = "" ]; then - # avoid warning for missing build size to reduce the noise - # in cases when the library fails to build - # echo "$myname: warning: unable to extract build size from $l" >&2 - unset fullbuildsize - unset cleanbuildsize - else - fullbuildsize=${buildsizes%%[^0-9]*} - cleanbuildsize=${buildsizes#[0-9]*[^0-9]} - - fullbuildsize=$((fullbuildsize * 1024)) - cleanbuildsize=$((cleanbuildsize * 1024)) - - if [ "$fullbuildsize" != "" ]; then - - # compute the minimum, maximum, sum, and average - if [ $fullbuildsize -lt $fullbuildsize_min ]; then - fullbuildsize_min=$fullbuildsize - fi - - if [ $cleanbuildsize -lt $cleanbuildsize_min ]; then - cleanbuildsize_min=$cleanbuildsize - fi - - if [ $fullbuildsize -gt $fullbuildsize_max ]; then - fullbuildsize_max=$fullbuildsize - fi - - if [ $cleanbuildsize -gt $cleanbuildsize_max ]; then - cleanbuildsize_max=$cleanbuildsize - fi - - fullbuildsize_sum=$((fullbuildsize_sum + fullbuildsize)) - cleanbuildsize_sum=$((cleanbuildsize_sum + cleanbuildsize)) - - buildsize_count=$((buildsize_count + 1)) - fi - - fullbuildsize=`format_size $fullbuildsize` - cleanbuildsize=`format_size $cleanbuildsize` - fi - - # extract the source repository revision number the build - # corresponds to from the name of the log - revno=`echo $l | sed "s/.*-\([1-9][0-9]*\)-log.*/\1/"` - if [ "$revno" = "" ]; then - echo "$myname: warning: unable to extract revision number from $l" >&2 - unset revno - fi - - # extract the build type from the name of the log - buildtype=`get_buildtype $l` - - # extract the operating system name and version from the log - osname=`get_os $txtlog` - - # extract hardware architecture info from the log - arch=`get_arch $txtlog` - - # extract compiler name and version from the log - compiler=`get_compiler $txtlog` - - # count the number of errors and warnings in the build - # avoid including false positives for words containing - # the string "error" or "warning" - - # avoid counting (often ignored) make errors - errors=` grep -i "[^a-z_A-Z0-9]error[^a-z_A-Z0-9]" $txtlog \ - | grep -v "[^a-z_A-Z0-9]*gmake[^a-z_A-Z0-9]"| wc -l` - - # (try to) avoid counting lines showing the context of the warning - # this should be tailored to every compiler - warnings=` grep -i "[^a-z_A-Z0-9]warning[^a-z_A-Z0-9]" $txtlog \ - | grep -i -v "called from here" | wc -l` - - ### - if [ $components_in_rows -ne 0 ]; then - # retrieve the revision log - # revlog="`svn log -r $revno \ - # http://svn.apache.org/repos/asf/stdcxx`" - - # trim the suffix from fname, including the revision number - # and the build type - fbase=${fname%%-log.gz.txt} - fbase=${fbase%-$revno} - fbase=${fbase%-$buildtype} - - # componse the column header - colhdr="$logcount" - colhdr="$colhdr" - - # when displaying one component (example, test, or locale) per row - # of the table, format the table header so as to include the build - # date, source repository revision number, and build type, and - # include the same information in the list of logs - - tbl_hdr_1="$tbl_hdr_1 " - tbl_hdr_2="$tbl_hdr_2 " - - if [ "$libsize" = "" ]; then - table_row=" " - else - table_row=" " - fi - - output "$table_row" - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - - cat <>$timings_file - - $table_row - - -EOF - - # extract timings for each stage and append them - # to the timings file - get_times "config" $txtlog >>$timings_file - get_times "lib" $txtlog >>$timings_file - get_times "examples" $txtlog >>$timings_file - get_times "bin" $txtlog >>$timings_file - get_times "tests" $txtlog >>$timings_file - get_times "runall" $txtlog >>$timings_file - get_times "total" $txtlog >>$timings_file - - echo " " >>$timings_file - fi done - - -if [ $components_in_rows -ne 0 ]; then - - gzlogsize_avg=$((gzlogsize_sum / logcount)) - txtlogsize_avg=$((txtlogsize_sum / logcount)) - - if [ 0 -ne $libcount ]; then - libsize_avg=$((libsize_sum / libcount)) - else - libsize_avg="" - fi - - if [ 0 -ne $buildsize_count ]; then - fullbuildsize_avg=$((fullbuildsize_sum / buildsize_count)) - cleanbuildsize_avg=$((cleanbuildsize_sum / buildsize_count)) - else - fullbuildsize_avg="" - cleanbuildsize_avg="" - fi - - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output " " - output "
logbuild
type
build and run times (M:SS)
configlibraryexamplesutilitiestestsrun timestotal
realusersysrealusersysrealusersysrealusersysrealusersysrealusersysrealusersys
logoperating
system
archcompilerbuild
type
start date and timeagerevisionsizesdiagnostics
librarylogbuilderrorswarnings
gziptextfullclean
$colhdr$buildtype
$colhdr$osname$arch$compiler$buildtype$date$age$revno$libsize$gzlogsize$txtlogsize$fullbuildsize$cleanbuildsize$errors$warnings
$colhdr$buildtype
min`format_size $libsize_min``format_size $gzlogsize_min``format_size $txtlogsize_min``format_size $fullbuildsize_min``format_size $cleanbuildsize_min`
max`format_size $libsize_max``format_size $gzlogsize_max``format_size $txtlogsize_max``format_size $fullbuildsize_max``format_size $cleanbuildsize_max`
total`format_size $libsize_sum``format_size $gzlogsize_sum``format_size $txtlogsize_sum``format_size $fullbuildsize_sum``format_size $cleanbuildsize_sum`
average`format_size $libsize_avg``format_size $gzlogsize_avg``format_size $txtlogsize_avg``format_size $fullbuildsize_avg``format_size $cleanbuildsize_avg`
" - output "
" - - cat <>$timings_file - - -EOF - cat $timings_file | output - -else - - output "
    " - - logcount=0 - for c in $example_list $test_list $locale_list; do - logcount=$((logcount + 1)) - - # output one build per row, with components in columns - table_header="$table_header $logcount" - output "
  1. $c
  2. " - done - - output "
" -fi - -output "
" ###################################################################### Modified: stdcxx/trunk/bin/xcomp.awk URL: http://svn.apache.org/viewvc/stdcxx/trunk/bin/xcomp.awk?rev=637269&r1=637268&r2=637269&view=diff ============================================================================== --- stdcxx/trunk/bin/xcomp.awk (original) +++ stdcxx/trunk/bin/xcomp.awk Fri Mar 14 14:15:02 2008 @@ -23,12 +23,10 @@ ######################################################################## # # SYNOPSIS -# myname [comptype=] [bodyonly=0|1] logs... +# myname [bodyonly=0|1] logs... # # VARIABLES: # bodyonly when non-zero, suppresses the tags -# comptype component type (example, locale, or test) -# expect set of expected results # ######################################################################## @@ -48,6 +46,15 @@ sectnames [2] = "test" sectnames [3] = "example" + # names of build stages + buildstages [1] = "config" + buildstages [2] = "lib" + buildstages [3] = "examples" + buildstages [4] = "bin" + buildstages [5] = "tests" + buildstages [6] = "runall" + buildstages [7] = "total" + # displayed and cout as failures states ["ASSERT"] = 1 states ["BUILD"] = 1 @@ -130,8 +137,8 @@ # regular expression to match a name (e.g., compiler or OS) re_name = "[A-Za-z][A-Za-z_0-9]*" - # regular expression to match a version string - re_version = "[1-9][0-9]*(\\.[0-9][0-9]*)*" + # regular expression to match a version string (includes 0) + re_version = "[0-9]+(\\.[0-9]+)*" # regular expression matching the buildtype string re_buildtype = "(8|11|12|15)[aAdDsS](-(solaris|win32))?" @@ -140,10 +147,21 @@ re_logname = re_name "-" re_version \ "-" re_name "-" re_name "-" re_version \ "-" re_buildtype "-" "[1-9][0-9]*-log" -} + # get today's date + "LC_ALL=C date" | getline todays_date + + # set the conversion format to two decimal places + CONVFMT = "%.3g" + + # field separator character (not an awk variable) + FSEP = "|" -# action to detect the type of file +} # BEGIN + +######################################################################## + +# detect the type of file 1 == FNR { section = 0 @@ -169,7 +187,7 @@ } -# action to process file containing specification of expected failures +# process file containing specification of expected failures 1 == expect_file && $1 ~ "^[^#][^#]" { if (1 == index($0, " ")) { @@ -227,8 +245,239 @@ ######################################################################## # logfile only processing below -# action to extract the (POSIX) build date and time (date output) -/^##* *date *: *$/ { +# extract operating system name and its version, and hardware +# architecture (if possible) +/^ *#+ *uname / { + + getline + + uname_output = $0 + + osname = $1 + osver = "" + osdesc = uname_output + arch = "" + archdesc = "" + + if (osname == "AIX") { + # AIX 2 5 00CBEEBE4C00 + osver = $4 "." $3 + arch = "PowerPC" + } + else if (osname ~ "^CYGWIN") { + # CYGWIN_NT-5.1 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin + osname = "Cygwin" + osver = substr($3, 1, index($3, "(") - 1) + + pos = match(uname_output, " i[2-6]86 ") + if (0 < pos) { + arch = substr(uname_output, pos + 1, 4) + } + else if (uname_output ~ " x86 ") { + arch = "x86" + } + } + else if (osname == "FreeBSD") { + # + osver = $3 + } + else if (osname == "HP-UX") { + # HP-UX B.11.31 U ia64 3417177861 unlimited-user license + # HP-UX B.11.23 U 9000/800 3952255646 unlimited-user license + # HP-UX B.11.11 U 9000/800 1936254444 unlimited-user license + osver = $3 + arch = $5 + } + else if (osname == "IRIX64") { + # IRIX64 6.5 04101930 IP27 + osver = $3 + arch = "MIPS" + } + else if (osname == "Linux") + # Linux #1 SMP x86_64 x86_64 x86_64 GNU/Linux + osver = "" + else if (osname == "SunOS") { + # SunOS Generic_118855-33 i86pc i386 i86pc + # SunOS Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V215 + # SunOS Generic_117350-43 sun4u sparc SUNW,Sun-Fire-V240 + osver = $3 + if (0 < index($0, "sparc")) + arch = "SPARC" + else + arch = "x86" + } + else if (osname == "OSF1") { + # OSF1 V5.1 1885 alpha + osver = $3 + } + + logos [FILENAME] = osname " " osver FSEP osdesc FSEP arch FSEP archdesc +} + + +# extract Linux distro name and version +/^ *#+ *cat *\/etc\/.*-release/ { + + getline + + if (1 == match($1, "^LSB_VERSION")) + getline + + osname = "" + osver = "" + osdesc = $0 + arch = "" + archdesc = "" + + # Red Hat Enterprise Linux Server release 5 (Tikanga) + # Red Hat Enterprise Linux AS release 4 (Nahant Update 4) + # Red Hat Enterprise Linux AS release 4 (Nahant Update 2) + # Red Hat Enterprise Linux AS release 3 (Taroon Update 8) + + # SUSE Linux Enterprise Server 10 (x86_64) + # SUSE LINUX Enterprise Server 9 (x86_64) + + # remove the Red Hat code name including the release + # and keep the distribution code name and update info: + # RHEL 5: Tikanga (Update 1 through 2) + # RHEL 4: Nahant (Update 1 through 6) + # RHEL 3: Taroon (Update 1 through 9) + # RHEL 2.1 AS: Pensacola + # RHEL 2.1 ES: Panama + + if ("RedHat" == $1 $2) { + + if ("EnterpriseLinux" == $3 $4) { + if ("AS" == $5) + osname = "RHAS" + else if ("ES" == $5) + osname = "RHES" + else if ("WS" == $5) + osname = "RHWS" + else + osname = "RHEL" + } + else + osname = "RHL" + + match($0, "release " re_version) + if (0 < RSTART) + osver = substr($0, RSTART + 8, RLENGTH - 8) + + match($0, "Update [1-9][0-9]*") + if (0 < RSTART) + osver = osver "." substr($0, RSTART + 7, RLENGTH - 7) + else + osver = osver ".0" + } + else if ($1 == "SUSE") { + osname = "SLES" + osver = $5 + } + + logos [FILENAME] = osname " " osver FSEP osdesc FSEP arch FSEP archdesc +} + + +# extract x86 processor name and version +/^ *#+ *cat *\/proc\/cpuinfo/ { + + arch = "" + archdesc = "" + + # look for CPU manufacturer and other goodies in the contents + # of /proc/cpuinfo + do { + getline + + if ($1 $2 $3 == "modelname:") { + + $1 = "" # model + $2 = "" # name + $3 = "" # : + + archdesc = $0 + } + + if ($1 $2 == "arch:") { + + $1 = "" # arch + $2 = "" # : + + arch = $0 + } + + if ($1 $2 == "family:") { + + $1 = "" # family + $2 = "" # : + + if (arch == "") + arch = "IA64" + + archdesc = $0 + } + + if (arch != "" && archdesc != "") + break + + } while (0 < NF) + + # bail if no architecture could be determined + if (arch == "" && archdesc == "") + next + + # strip leading whitespace (result of assigning $N = "") + archdesc = substr(archdesc, match(archdesc, "[A-Za-z]")) + + n = split(logos [FILENAME], platfields, FSEP) + osname = platfields [1] + osdesc = platfields [2] + # arch = platfields [3] + # archdesc = platfields [4] + + if (uname_output ~ " x86_64 ") { + if (archdesc ~ "Intel\\(R\\)") + arch = "EM64T" + else if (archdesc ~ "AMD ") + arch = "AMD64" + else + arch = "x86_64" + } + else if (uname_output ~ " ia64 ") { + if (arch == "") + arch = "IA64" + } + else if (arch == "") { + pos = match(uname_output, " i[3456]86 ") + if (0 < pos) + arch = substr(uname_output, pos + 1, 4) + else if (uname_output ~ " x86 ") + arch = "x86" + } + + logos [FILENAME] = osname FSEP osdesc FSEP arch FSEP archdesc +} + + +# extract processor architecture info on Windows +/^PROCESSOR_IDENTIFIER=/ { + + n = split(logos [FILENAME], platfields, FSEP) + osname = platfields [1] + osdesc = platfields [2] + arch = platfields [3] + archdesc = substr($0, index($0, "=") + 1) + + if ("" == arch) + arch = substr(archdesc, 1, index(archdesc, " ") - 1) + + logos [FILENAME] = osname FSEP osdesc FSEP arch FSEP archdesc +} + + +# extract the (POSIX) build date and time (date output) +/^ *#+ *date *: *$/ { getline @@ -236,8 +485,8 @@ } -# action to extract the Windows build date (date /T output) -/ *date *[/]T *$/ { +# extract the Windows build date (date /T output) +/>date *[/]T *$/ { getline @@ -245,6 +494,172 @@ } +# extract compiler name and version +/^configuring stdcxx / { + + cxxdesc = $5 + + pos = index(cxxdesc, "-") + if (0 < pos) { + cxxname = substr(cxxdesc, 1, pos - 1) + cxxver = substr(cxxdesc, pos + 1) + } + else + cxxname = cxxdesc + + if (cxxname == "aCC") + cxxname = "HP aCC" + else if (cxxname == "CC" && uname_output ~ "^IRIX64") + cxxname = "SGI MIPSpro" + else if (cxxname == "cxx" && uname_output ~ "^OSF1") + cxxname = "HP C++" + else if (cxxname == "eccp") + cxxname = "EDG eccp" + else if (cxxname == "icc") + cxxname = "Intel C++" + else if (cxxname ~ "^xlC") + cxxname = "IBM XLC++" + + logos [FILENAME] = logos [FILENAME] FSEP cxxname " " cxxver FSEP cxxdesc +} + + +# extract compiler name and version (Visual Studio build) +/^Configuring for / { + + cxxdesc = $3 + + pos = index(cxxdesc, "-") + if (0 < pos) { + cxxname = substr(cxxdesc, 1, pos - 1) + cxxver = substr(cxxdesc, pos + 1) + } + else + cxxname = cxxdesc + + if (cxxname == "msvc") + cxxname = "MSVC" + else if (cxxname = "icc") + cxxname = "Intel C++" + + logos [FILENAME] = logos [FILENAME] FSEP cxxname " " cxxver FSEP cxxdesc +} + + +# extract compiler name and version (Visual Studio build) +/^Selected compiler: / { + $1 = "" + $2 = "" + cxxdesc = $0 + + if (cxxdesc ~ "Intel.*C++") { + cxxname = "Intel C++" + cxxver = $5 + } + else { + cxxname = $1 " " $2 + cxxver = $3 + } + + logos [FILENAME] = logos [FILENAME] FSEP cxxname " " cxxver FSEP cxxdesc +} + + +# see if the library failed to configure or build (UNIX) +/^g?make: \*\*\* \[(config|lib)\] Error/ { + buildstatus [FILENAME] = "LIB" +} + + +# see if the library failed to configure or build (Windows) +/.stdcxx - [1-9][0-9]* error(s), [1-9][0-9]* warning(s)/ { + buildstatus [FILENAME] = "LIB" +} + + +# extract the real, user and system times for the children of the shell +# that executed the commands from the log +# the format of the output is: +# +# +# with looking like: +# [1-9][0-9]*m[1-9][0-9]s +# and with being the output of the POSIX standard times +# built-in utility, i.e., the first line giving the system and user times +# for the shell and the second line giving the system and user times for +# its children in the format: +# "%dm%fs %dm%fs" +# we don't care about the shell times, just the times for its children, +# so we skip that line +/^ *#+ real, user, system time \(/ { + + stage = substr($6, 2, index($6, ")") - 2); + + getline # real time + times = $0 + getline # ignore shell times + getline # times for all children + + pos = index($0, " ") + times = times FSEP substr($0, 1, pos - 1) + times = times FSEP substr($0, pos + 1) + + # times is: FSEP FSEP + logstagetimes [FILENAME, stage] = times +} + + +# extract the size of the library +/^ *#+ ls -l/ { + + while (0 < NF) { + size = $5 + getline + } + + libsizes [FILENAME] = size + +} + + +# extract the full build size or the size after the clean target +/^ *#+ *du -sk / { + + getline + + if (FILENAME in buildsizes) + cleansizes [FILENAME] = $1 + else + buildsizes [FILENAME] = $1 +} + + +# count the number of (make) errors +/^g?make: \*\*\* \[.*\] Error /{ + + ++logerrors [FILENAME] +} + + +# count the number of (Visual Studio) errors +/ - [1-9][0-9]* error\(s\), [1-9][0-9]* warning\(s\)/{ + + if (cxxname ~ "^MSVC") + ++logerrors [FILENAME] +} + + +# count the number of warnings +/[^A-Z_0-9](WARNING|[Ww]arning)[^A-Z_0-9]/ { + + # if the library hasn't been seen yet count this as a library warning + if (!(FILENAME in libsizes)) + ++libwarnings [FILENAME] + else + ++logwarnings [FILENAME] +} + + # action at the beginning of component table /^NAME *STATUS WARN/ { start = 1 @@ -259,6 +674,7 @@ next } + # end of component table /^PROGRAM SUMMARY:$/ { @@ -452,7 +868,6 @@ 3 == section && 1 == start { } - ######################################################################## # functions @@ -493,6 +908,25 @@ } +# extracts operating system name and version from the log file name +function get_osname(fname) +{ + # strip directory prefix from filename + pos = match(fname, ".*/") + if (0 < pos) + fname = substr(fname, RLENGTH + 1) + + # strip anything after the first dash + pos = match(fname, "-") + if (0 == pos) + return "" + + osname = substr(fname, 1, pos - 1) + # TO DO: extract version here + return osname +} + + # extracts the build type from the log file name function get_buildtype(fname) { @@ -508,8 +942,7 @@ "-(8|11|12|15)[aAdDsS]-[a-z][a-z_0-9]*-[1-9][0-9]*-log*") buildtype = substr(fname, pos + 1) - - pos = index(buildtype, "-") + pos = index(buildtype, "-") buildtype = substr(buildtype, 1, pos - 1) return buildtype @@ -787,6 +1220,10 @@ colnos = "" + # the date of the last log + lastdate = "" + datespan = 0 + # iterate over the array of section counts for each log file # and compose the column headers for each log for (i = 1; i <= logcount; ++i) { @@ -824,9 +1261,39 @@ date = "N/A" } - row2 = row2 " " date "\n" + if (0 == datespan) { + lastdate = date + datespan = 1 + } + else if (date == lastdate) + ++datespan + else { + row2 = row2 " " date "\n" + else + row2 = row2 " title=\"" fulldate "\">" date "\n" + + lastdate = date + datespan = 1 + } } + # append the date of last set of logs + row2 = row2 " " date "\n" + else + row2 = row2 " title=\"" fulldate "\">" date "\n" + row0 = row0 colnos "\n \n" row1 = row1 " \n" row2 = row2 " \n" @@ -1235,6 +1702,333 @@ } +function format_size(size) +{ + if (1000000000 <= size) + return size / 1073741824.0 " GB" + + if (1000000 <= size) + return size / 1048576.0 " MB " + + if (1000 <= size) + return size / 1024 " kB" + + if (0 < size) + return size " B" + + return size +} + + +function print_logtable() +{ + thead = \ + " \n" \ + " \n" \ + " " \ + "log\n" \ + " operating
system\n" \ + " " \ + "arch\n" \ + " compiler\n" \ + " build
type\n" \ + " start date and time\n" \ + " " \ + "age\n" \ + " revision\n" \ + " sizes\n" \ + " diagnostics\n" \ + " \n" \ + " \n" \ + " \n" \ + " " \ + "library\n" \ + " log\n" \ + " build\n" \ + " " \ + "errors\n" \ + " " \ + "warnings\n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " gzip\n" \ + " text\n" \ + " full\n" \ + " clean\n" \ + " lib\n" \ + " other\n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " " + + print "

Logs and Columns

" + print " " + print thead + print " " + + for (i = 1; i <= logcount; ++i) { + + fname = logfnames [i] + + n = split(logos [fname], platfields, FSEP) + osname = platfields [1] + osdesc = platfields [2] + arch = platfields [3] + archdesc = platfields [4] + cxxname = platfields [5] + cxxdesc = platfields [6] + + if (fname in buildstatus) + print " " + else + print " " + + print " " + + ################################################################ + # extract and format the operating system name and version + oscell = "" osname"" + + ################################################################ + # extract and format the hardware architecture + archcell = "" arch "" + + ################################################################ + # extract and format the compiler and version + cxxcell = "" cxxname "" + + print " " oscell + print " " archcell + print " " cxxcell + + ################################################################ + # extract build type from log file name + buildtype = get_buildtype(fname) + buildmode = buildmodes [buildtype] + + print " " + print " " + + # compute and format the age of the build + duration = "~/stdcxx/bin/duration -f \"" logdates [fname] \ + "\" \"" todays_date "\"" + duration | getline fullage + + pos = index(fullage, ", ") + buildage = substr(fullage, 1, pos - 1) + print " " + + pos = match(fname, "-[1-9][0-9]*-log") + buildrev = substr(fname, pos + 1, RLENGTH - 5) + + ################################################################ + # format a ViewVC URL to the revision number/log + revurl = "http://svn.apache.org/viewvc?view=rev&rev=" buildrev + print " " + + ################################################################ + # library size + fullsize = fname in libsizes ? libsizes [fname] : "" + size = format_size(libsizes [fname]) + print " " + + print " " + + ################################################################ + # format the size of the expanded log file + cmd = "du -k " fname + cmd | getline + fullsize = $1 + size = format_size(fullsize * 1024) + + print " " + + ################################################################ + # compute the full build size + fullsize = fname in buildsizes ? buildsizes [fname] : "" + size = format_size(fullsize * 1024) + print " " + + ################################################################ + # format the build size after the clean target has been run + fullsize = fname in cleansizes ? cleansizes [fname] : "" + size = format_size(fullsize * 1024) + print " " + + print " " + print " " + print " " + print " " + } + + print " " + print " " + print " " + print "
" i "" buildtype "" logdates [fname] "" buildage "" buildrev "" size "" gzlogsize "" size "" size "" size "" logerrors [fname] "" libwarnings [fname] "" logwarnings [fname] "
" +} + + +# reformat time string argument in the original format of "NmN.NNNs" +# (i.e., as produced by the times shell utility), as "M:SS" rounding +# fractional seconds as necessary +function format_time(timestr) +{ + pos = index(timestr, "m") + mins = substr(timestr, 1, pos - 1) + secs = substr(timestr, pos + 1) + secs = substr(secs, 1, length(secs) - 1) + + timestr = mins ":" + if (int(secs) < 10) + timestr = timestr "0" + + timestr = timestr int(secs) + + return timestr +} + + +function print_timingstable() +{ + thead = \ + "\n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" \ + " \n" + + print "

Timings

" + print "
" \ + "logbuild
type
build and run times (M:SS)
" \ + "config" \ + "library" \ + "examples" \ + "utilities" \ + "tests" \ + "run times" \ + "total
realusersysrealusersysrealusersysrealusersysrealusersysrealusersysrealusersys
" + print thead + print " " + + for (i = 1; i <= logcount; ++i) { + + fname = logfnames [i] + + if (fname in buildstatus) + print " " + else + print " " + + print " " + + buildtype = get_buildtype(fname) + print " " + + timecells = "" + + for (j = 1; j in buildstages; ++j) { + + stage = buildstages [j]; + + if ((fname, stage) in logstagetimes) { + + # format real, user, and system times for the stage + timestr = logstagetimes [fname, stage] + split(timestr, atimes, FSEP) + + realtim = format_time(atimes [1]) + usrtim = format_time(atimes [2]) + systim = format_time(atimes [3]) + + timecells = timecells "" + timecells = timecells "" + timecells = timecells "" + } + else { + timecells = timecells "" + } + } + + print timecells "" + } + + print " " + print " " + print " " + print "
" i "" buildtype "" realtim "" usrtim "" systim "
" +} + + END { if (0 == bodyonly) { @@ -1244,6 +2038,10 @@ print " " print " " } + + print_logtable() + + print_timingstable() for (section = 1; section <= 3; ++section) print_section(section)