This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[patch] Scripts for doing automated SPEC testing.


Since I received a few requests for the scripts, maybe it's
easier if we just keep them in the contrib/ directory.  The
scripts are somewhat rough and need some editing before you can
plug them into a crontab entry.

Is this appropriate for gcc/contrib?

Thanks.



2001-03-05  Diego Novillo  <dnovillo@redhat.com>

	* spec: New directory with scripts for doing automated SPEC runs. 
	* spec/README: New file.
	* spec/TODO: New file.
	* spec/build: New file.
	* spec/dospec: New file.
	* spec/gcc.cfg.skel: New file.
	* spec/isolate: New file.
	* spec/motd.goaway: New file.
	* spec/nightlyspec: New file.
	* spec/perf.plt.skel: New file.
	* spec/perfrc: New file.
	* spec/report: New file.
	* spec/report.html.skel: New file.
	* spec/update: New file.

Index: spec/README
===================================================================
RCS file: README
diff -N README
*** /dev/null	Tue May  5 13:32:27 1998
--- README	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,17 ----
+ 
+ These scripts are used to do unattended SPEC runs. Everything is driven by
+ `nightlyspec'. A typical command line will look like:
+ 
+ ./nightlyspec $HOME/perf/sandbox-gcc :ext:gcc.gnu.org:/cvs/gcc gcc gcc
+ 
+ The first argument is the source and build directory. The second argument
+ is your CVSROOT, the third argument is the name of the CVS module to
+ checkout, and the last argument is the name for the directory created by
+ the 'cvs co' operation.
+ 
+ All the configuration settings are in `perfrc'. There is very little in the
+ way of documentation, but things are generally commented in the scripts, so
+ it shouldn't be too bad.
+ 
+ If you need help setting things up, drop me a line at dnovillo@redhat.com
+ 
Index: spec/TODO
===================================================================
RCS file: TODO
diff -N TODO
*** /dev/null	Tue May  5 13:32:27 1998
--- TODO	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,11 ----
+ 
+ - Charts for overall SPEC marks.
+ 
+ - Charts for compilation times.
+ 
+ - Cates for historic data. Having all that daily info becomes meaningless
+   after a while. Maybe take the average of the last 3-4 months and
+   summarize them in one data point.
+ 
+ - Add "historic" versions, e.g. 2.95.2, 2.7.2 and 2.8.1 to see how the
+   current versions compare to those old versions.
Index: spec/build
===================================================================
RCS file: build
diff -N build
*** /dev/null	Tue May  5 13:32:27 1998
--- build	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,85 ----
+ #!/bin/sh
+ #
+ # (C) 2000, 2001 Free Software Foundation
+ # Originally by Diego Novillo <dnovillo@redhat.com>, Aug 2000.
+ #
+ # This script is Free Software, and it can be copied, distributed and
+ # modified as defined in the GNU General Public License.  A copy of
+ # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+ 
+ source `dirname $0`/perfrc || exit 1
+ 
+ echo "Action:   Build and Install GCC"
+ echo "Arch:     ${HOSTTYPE}"
+ echo "Host:     ${HOST}"
+ echo "Source:   ${SRCDIR}"
+ echo "Build:    ${builddir}"
+ echo "Install:  ${installdir}"
+ echo "Log:      ${buildlogfile}"
+ echo "Start:    `date`"
+ 
+ if [ ! -d ${builddir} ] ; then
+     echo
+     echo "Directory ${builddir} doesn't exist. Creating."
+ else
+     echo
+     echo "Removing previous build directory ${builddir}."
+     rm -rf ${builddir} || exit 1
+ fi
+ mkdir -p ${builddir} || exit 1
+ 
+ if [ ! -d ${buildlogdir} ] ; then
+     echo
+     echo "Directory ${buildlogdir} doesn't exist. Creating."
+     mkdir -p ${buildlogdir} || exit 1
+ fi
+ 
+ # Archive previously installed binaries, if any.
+ echo
+ set -x
+ cd ${sandboxarch}
+ set +x
+ for prevbindir in install-???????? ; do
+     if [ -d ${prevbindir} ] ; then
+ 	echo
+ 	if [ ! -f ${prevbindir}.tar.gz ] ; then
+ 	    set -x
+ 	    tar czf ${prevbindir}.tar.gz ${prevbindir} || exit 1
+ 	    rm -rf ${prevbindir}
+ 	    set +x
+ 	else
+ 	    echo "File ${prevbindir}.tar.gz already exists. Skipping."
+ 	fi
+     fi
+ done
+ 
+ echo
+ set -x
+ cd ${builddir}
+ ${SRCDIR}/configure --prefix=${installdir} --srcdir=${SRCDIR} --enable-languages=c >${buildlogfile} 2>&1
+ status=$?
+ set +x
+ 
+ if [ ${status} -eq 0 ] ; then
+     echo
+     set -x
+     make all install >>${buildlogfile} 2>&1
+     status=$?
+     set +x
+ fi
+ 
+ if [ ${status} -eq 0 ] ; then
+     touch ${buildokfile}
+ else
+     echo
+     echo "Build failed. Tail end of log file follows:"
+     echo
+     tail ${buildlogfile}
+ fi
+ 
+ gzip -9fv ${buildlogfile}
+ 
+ echo
+ echo "Finish:   `date`"
+ 
+ exit ${status}
Index: spec/dospec
===================================================================
RCS file: dospec
diff -N dospec
*** /dev/null	Tue May  5 13:32:27 1998
--- dospec	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,105 ----
+ #!/bin/sh
+ #
+ # (C) 2000, 2001 Free Software Foundation
+ # Originally by Diego Novillo <dnovillo@redhat.com>, Aug 2000.
+ #
+ # This script is Free Software, and it can be copied, distributed and
+ # modified as defined in the GNU General Public License.  A copy of
+ # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+ 
+ source `dirname $0`/perfrc || exit 1
+ 
+ bailout() {
+     killall specperl
+     killall specmake
+     isolate -r
+     exit 1
+ }
+ 
+ trap bailout SIGHUP SIGTERM SIGINT SIGABRT SIGQUIT
+ 
+ echo "Action:   Running SPEC"
+ echo "Arch:     ${HOSTTYPE}"
+ echo "Host:     ${HOST}"
+ echo "Install:  ${installdir}"
+ echo "Log:      ${speclogfile}"
+ echo "Results:  ${specresultdir}"
+ echo "Start:    `date`"
+ 
+ if [ ! -d ${installdir} ] ; then
+     echo
+     echo "Error: Directory ${installdir} doesn't exist. Aborting."
+     exit 1
+ fi
+ 
+ if [ ! -d ${specresultdir} ] ; then
+     mkdir -p ${specresultdir} || exit 1
+ else
+     # Remove any existing files in ${specresultdir}.
+     echo
+     set -x
+     rm -f ${specresultdir}/*
+     set +x
+ fi
+ 
+ # Setup SPEC configuration file
+ (cat ${specconfigskel} | \
+     sed --expression="s:%EXT%:${ext}:g;\
+ 		      s:%CC%:${cc}:g;\
+ 		      s:%MODEL%:${model}:g;\
+ 		      s:%CPU%:${cpu}:g;\
+ 		      s:%NCPU%:${ncpu}:g;\
+ 		      s:%CACHE%:${cache}:g;\
+ 		      s:%MEMORY%:${memory}:g;\
+ 		      s:%OS%:${os}:g;\
+ 		      s:%COMPILER%:${compiler}:g;\
+ 		      s:%DATE%:${date_fmt}:g;\
+ 		      s:%HOST%:${HOST}:g;\
+ 		      s:%BASE_CFLAGS%:${base_cflags}:g;\
+ 		      s:%PEAK_CFLAGS%:${peak_cflags}:g")\
+     > ${specconfigfile} || exit 1
+ 
+ # Isolate the machine from the network.
+ echo
+ set -x
+ ${scriptsdir}/isolate -f
+ set +x
+ 
+ # Run SPEC95.
+ echo
+ set -x
+ cd ${SPEC}
+ ${SPEC}/bin/runspec -i ref -I -D -d -a validate -c `basename ${specconfigfile}` -n 3 -o all -A -T all -f int >${speclogfile} 2>&1
+ status=$?
+ set +x
+ 
+ # Restore the connections.
+ echo
+ set -x
+ ${scriptsdir}/isolate -r
+ set +x
+ 
+ # Copy log and report files to ${specresultdir}. Note that this will break
+ # if you do two or more SPEC runs simultaneously on the same SPEC
+ # directory.
+ runnum=`ls -1 ${SPEC}/result/log.* | tail -1 | awk -F. '{ print $NF }'`
+ echo
+ set -x
+ cp -a ${SPEC}/result/*.${runnum}* ${specresultdir}
+ set +x
+ 
+ if [ ${status} -eq 0 ] ; then
+     touch ${specokfile}
+ else
+     echo
+     echo "SPEC run failed. Tail end of log file follows:"
+     echo
+     tail ${speclogfile}
+ fi
+ 
+ # gzip -9fv ${specresultdir}/log.${runnum}
+ 
+ echo
+ echo "Finish:   `date`"
+ 
+ exit ${status}
Index: spec/gcc.cfg.skel
===================================================================
RCS file: gcc.cfg.skel
diff -N gcc.cfg.skel
*** /dev/null	Tue May  5 13:32:27 1998
--- gcc.cfg.skel	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,257 ----
+ # These are the default actions taken by runspec
+ VENDOR		= Red Hat, Inc.
+ action		= validate
+ tune		= all
+ output_format	= all
+ ext		= %EXT%
+ 
+ # SPEC allows a certain amount of cutomization within the configuration
+ # file. These are controlled with a line of four configuration 
+ # settings.
+ #
+ # These are listed as benchmark=tuning=extension=machine
+ # where:
+ # 	"benchmark" is either a specific benchmark (like 099.go)
+ #	or a benchmark type ("int" or "fp").
+ #	"tuning" is the type of tuning ("base" or "peak" (or non-base
+ #	as described in RUNRULE.txt))
+ #	"extension" is defined by the user and is typically used to
+ #	idntify various executables.
+ #	"machine" is also defined by the user and is typically
+ # 	used to allow different setting for different machines.
+ #
+ # For example, 
+ #	124.m88ksim=peak=ccv1.2=80286
+ #
+ # would indicate the specific optimizations to use for the peak/non-base
+ # compilation of the 124.m88ksim benchmark using the complier identified
+ # as version 1.2 and run on a machine with a 80286.
+ #
+ # If there is no specific setting for one of these four items, the 
+ # word "default" is used
+ 
+ # Set the compiler to use.
+ default=default=default:
+ CC	= %CC%
+ 
+ # Set the base flags for the integer benchmarks
+ # Note: Per the runrules, the baseline optimization flags must be applied
+ # to all of the benchmarks in the same order.
+ int=base=default=default:
+ OPTIMIZE = %BASE_CFLAGS%
+ LIBS =
+ 
+ # Set the base flags for the floating point benchmarks
+ fp=base=default=default:
+ OPTIMIZE = %BASE_CFLAGS%
+ LIBS =
+ 
+ # Set the peak/non-base/aggressively compiled flags for each benchmark
+ # The SPEC RUNRULES allow each benchmark in a non-base run to use
+ # different flags.
+ int=peak=default=default:
+ OPTIMIZE = %PEAK_CFLAGS%
+ LIBS =
+ 
+ # Set the peak flags for the floating point benchmarks
+ fp=peak=default=default:
+ OPTIMIZE = %PEAK_CFLAGS%
+ LIBS =
+ 
+ # Enter any portability flags you may need (portability
+ # flags are defined in RUNRULES.txt)
+ #
+ # All of the benchmarks are listed here. If a benchmark does not 
+ # need a portability flag leave it blank
+ #
+ # Integer benchmarks
+ 099.go=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 124.m88ksim=default=default=default:
+ EXTRA_CFLAGS = -DLEHOST
+ EXTRA_LIBS = 
+ 
+ 126.gcc=default=default=default:
+ EXTRA_CFLAGS =
+ EXTRA_LIBS = 
+ 
+ 129.compress=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 130.li=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = -lm
+ 
+ 132.ijpeg=default=default=default:
+ EXTRA_CFLAGS =
+ EXTRA_LIBS = 
+ 
+ 134.perl=default=default=default:
+ EXTRA_CFLAGS =
+ EXTRA_LIBS = -lm
+ 
+ 147.vortex=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = -lm
+ 
+ # Floating point  benchmarks
+ 101.tomcatv=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 102.swim=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 103.su2cor=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 104.hydro2d=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 107.mgrid=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 110.applu=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 125.turb3d=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 141.apsi=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 145.fpppp=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 146.wave5=default=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 
+ # Extra flags for aggressive optimization. Integer benchmarks.
+ 099.go=peak=default=default:
+ EXTRA_CFLAGS =
+ EXTRA_LIBS = 
+ 
+ 124.m88ksim=peak=default=default:
+ EXTRA_CFLAGS = -DLEHOST
+ EXTRA_LIBS = 
+ 
+ 126.gcc=peak=default=default:
+ EXTRA_CFLAGS =
+ EXTRA_LIBS = 
+ 
+ 126.gcc=peak=default=default:
+ EXTRA_CFLAGS =
+ EXTRA_LIBS = 
+ 
+ 129.compress=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 129.compress=peak=default=default:
+ EXTRA_CFLAGS =
+ EXTRA_LIBS = 
+ 
+ 130.li=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = -lm
+ 
+ 132.ijpeg=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 134.perl=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = -lm
+ 
+ 147.vortex=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = -lm
+ 
+ # Extra flags for aggressive optimization. Floating point benchmarks.
+ 101.tomcatv=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 102.swim=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 103.su2cor=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 104.hydro2d=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 107.mgrid=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 110.applu=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 125.turb3d=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 141.apsi=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 145.fpppp=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 146.wave5=peak=default=default:
+ EXTRA_CFLAGS = 
+ EXTRA_LIBS = 
+ 
+ 
+ # The following information shows the variables that can be set
+ # to fill in the text section of your reporting pages
+ #
+ # The following sets the values for the integer results:
+ #
+ # (Change to appropriate values for your system)
+ default=default=default=default:
+ hw_model    = %MODEL%
+ hw_cpu      = %CPU%
+ hw_fpu      = Integrated
+ hw_ncpu     = %NCPU%
+ hw_pcache   = 
+ hw_scache   = %CACHE%
+ hw_ocache   = 
+ hw_memory   = %MEMORY%
+ hw_disk     =
+ hw_other    = 
+ hw_avail    = Now
+ sw_os       = %OS%
+ sw_file     =
+ sw_state    = multiuser
+ sw_avail    = Now
+ sw_compiler = %COMPILER%
+ license_num = 001159
+ tester_name = Diego Novillo
+ prepared_by = Diego Novillo
+ test_date   = %DATE%
+ company_name= Red Hat, Inc.
+ machine_name= %HOST%
+ notes01	= Base flags: %BASE_CFLAGS%
+ notes02	= Peak flags: %PEAK_CFLAGS%
+ # Additional note lines can be added. For example, the next note
+ # would be: notes03 =
Index: spec/isolate
===================================================================
RCS file: isolate
diff -N isolate
*** /dev/null	Tue May  5 13:32:27 1998
--- isolate	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,45 ----
+ #!/bin/sh
+ #
+ # (C) 2000, 2001 Free Software Foundation
+ # Originally by Diego Novillo <dnovillo@redhat.com>, Aug 2000.
+ #
+ # This script is Free Software, and it can be copied, distributed and
+ # modified as defined in the GNU General Public License.  A copy of
+ # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+ 
+ goaway=`dirname $0`/motd.goaway
+ 
+ if [ "$1" = "" -o "$1" = "-f" ] ; then
+     if [ "$1" = "" ] ; then
+ 	printf "About to isolate machine. Continue? [n] "
+ 	read i
+ 	if [ "$i" != "y" ] ; then
+ 	    exit 0
+ 	fi
+     fi
+ 
+     set -x
+     sudo killall -STOP crond
+     sudo killall -STOP atd
+     sudo mv -f /etc/motd /etc/motd.orig
+     sudo cp -af ${goaway} /etc/motd
+     cat /etc/motd | wall
+     set +x
+     exit 0
+ elif [ "$1" = "-r" ] ; then
+     set -x
+     sudo killall -CONT crond
+     sudo killall -CONT atd
+     sudo mv -f /etc/motd.orig /etc/motd
+     (echo "***";\
+      echo "*** SPEC runs finished.";\
+      echo "***";\
+     ) | wall
+     set +x
+     exit 0
+ else
+     echo "usage: `basename $0` [-r]"
+     echo
+     echo "Isolate the machine from the network (-r restores connectivity)."
+     exit 1
+ fi
Index: spec/motd.goaway
===================================================================
RCS file: motd.goaway
diff -N motd.goaway
*** /dev/null	Tue May  5 13:32:27 1998
--- motd.goaway	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,7 ----
+ ******************************************************************************
+ **                                                                          **
+ **			    SPEC IS NOW RUNNING!                            **
+ **                                                                          **
+ **		Go away or avoid running CPU intensive programs.            **
+ **                                                                          **
+ ******************************************************************************
Index: spec/nightlyspec
===================================================================
RCS file: nightlyspec
diff -N nightlyspec
*** /dev/null	Tue May  5 13:32:27 1998
--- nightlyspec	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,73 ----
+ #!/bin/sh
+ #
+ # (C) 2000, 2001 Free Software Foundation
+ # Originally by Diego Novillo <dnovillo@redhat.com>, Aug 2000.
+ #
+ # This script is Free Software, and it can be copied, distributed and
+ # modified as defined in the GNU General Public License.  A copy of
+ # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+ 
+ source `dirname $0`/perfrc || exit 1
+ 
+ unlock() {
+     echo
+     printf "rm -f ${lockfile}: "
+     rm -f ${lockfile}
+     echo "OK."
+ }
+ 
+ finish() {
+     if [ $1 -ne 0 ] ; then
+ 	echo "ERROR"
+ 	echo
+ 	echo "Previous command failed. Aborting. Check log files."
+     fi
+     unlock
+     echo
+     echo "Finish:   `date`"
+     exit $1
+ }
+ 
+ [ ! -d ${updatelogdir} ] && (mkdir -p ${updatelogdir} || exit 1)
+ rm -f ${nightlyspeclogfile}
+ touch ${nightlyspeclogfile}
+ 
+ echo "SPEC95 Tests (${date_fmt})"
+ echo
+ echo "Start:    `date`"
+ echo "CVSROOT:  ${CVSROOT}"
+ echo "Module:   ${CVSMODULE}"
+ echo "Log:      ${nightlyspeclogfile}"
+ echo
+ 
+ printf "lockfile -r 3 ${lockfile}: "
+ lockfile -r 3 ${lockfile} || exit 1
+ echo "OK."
+ echo
+ 
+ printf "${scriptsdir}/update: "
+ if [ ! -f ${updateokfile} ] ; then
+     ${scriptsdir}/update >>${nightlyspeclogfile} 2>&1 || finish 1
+     echo "OK."
+ else
+     echo "SKIPPED."
+ fi
+ 
+ printf "${scriptsdir}/build: "
+ if [ ! -f ${buildokfile} ] ; then
+     ${scriptsdir}/build >>${nightlyspeclogfile} 2>&1 || finish 1
+     echo "OK."
+ else
+     echo "SKIPPED."
+ fi
+ 
+ printf "${scriptsdir}/dospec: "
+ if [ ! -f ${specokfile} ] ; then
+     ${scriptsdir}/dospec >>${nightlyspeclogfile} 2>&1 || finish 1
+     ${scriptsdir}/report >>${nightlyspeclogfile} 2>&1 || finish 1
+     echo "OK."
+ else
+     echo "SKIPPED."
+ fi
+ 
+ finish 0
Index: spec/perf.plt.skel
===================================================================
RCS file: perf.plt.skel
diff -N perf.plt.skel
*** /dev/null	Tue May  5 13:32:27 1998
--- perf.plt.skel	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,108 ----
+ #!/usr/bin/gnuplot -persist
+ #
+ # $Id: perf.plt.skel,v 1.7 2000/11/04 01:55:52 dnovillo Exp $
+ #    
+ #    	G N U P L O T
+ #    	Linux version 3.7
+ #    	patchlevel 1
+ #    	last modified Fri Oct 22 18:00:00 BST 1999
+ #    
+ #    	Copyright(C) 1986 - 1993, 1998, 1999
+ #    	Thomas Williams, Colin Kelley and many others
+ #    
+ #    	Type `help` to access the on-line reference manual
+ #    	The gnuplot FAQ is available from
+ #    	<http://www.ucc.ie/gnuplot/gnuplot-faq.html>
+ #    
+ #    	Send comments and requests for help to <info-gnuplot@dartmouth.edu>
+ #    	Send bugs, suggestions and mods to <bug-gnuplot@dartmouth.edu>
+ #    
+ set terminal %TERMINAL%
+ set output %OUTFILE%
+ set noclip points
+ set clip one
+ set noclip two
+ set bar 1.000000
+ set border 31 lt -1 lw 1.000
+ set xdata time
+ set ydata
+ set zdata
+ set x2data
+ set y2data
+ set boxwidth 0
+ set dummy x,y
+ set format x "%b%d"
+ set format y "%g"
+ set format x2 "%g"
+ set format y2 "%g"
+ set format z "%g"
+ set angles radians
+ set grid xtics ytics
+ set key title ""
+ set key right top Right noreverse box linetype -2 linewidth 1.000 samplen 4 spacing 1 width 0
+ set label
+ set noarrow
+ set nolinestyle
+ set nologscale
+ set offsets 0, 0, 0, 0
+ set pointsize 1
+ set encoding default
+ set nopolar
+ set noparametric
+ set view 60, 30, 1, 1
+ set samples 100, 100
+ set isosamples 10, 10
+ set surface
+ set nocontour
+ set clabel '%8.3g'
+ set mapping cartesian
+ set nohidden3d
+ set cntrparam order 4
+ set cntrparam linear
+ set cntrparam levels auto 5
+ set cntrparam points 5
+ set size ratio 0 1,1
+ set origin 0,0
+ set data style points
+ set function style lines
+ set xzeroaxis lt -2 lw 1.000
+ set x2zeroaxis lt -2 lw 1.000
+ set yzeroaxis lt -2 lw 1.000
+ set y2zeroaxis lt -2 lw 1.000
+ set tics in
+ set ticslevel 0.5
+ set ticscale 1 0.5
+ set mxtics default
+ set mytics default
+ set mx2tics default
+ set my2tics default
+ set xtics border mirror norotate autofreq
+ set ytics border mirror norotate autofreq 
+ set ztics border nomirror norotate autofreq 
+ set nox2tics
+ set noy2tics
+ set title "%TITLE%\n\n%DATE%" 0.000000,0.000000  ""
+ set timestamp "" bottom norotate 0.000000,0.000000  ""
+ set rrange [ * : * ] noreverse nowriteback  # (currently [-0.00000:10.0000] )
+ set trange [ * : * ] noreverse nowriteback  # (currently ["19991231":"20000101"] )
+ set urange [ * : * ] noreverse nowriteback  # (currently ["19991231":"20000101"] )
+ set vrange [ * : * ] noreverse nowriteback  # (currently [-5.00000:5.00000] )
+ set xlabel "" 0.000000,0.000000  ""
+ set x2label "" 0.000000,0.000000  ""
+ set timefmt "%Y%m%d"
+ set xrange [ * : * ] noreverse nowriteback  # (currently ["19991231":"20000101"] )
+ set x2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
+ set ylabel "" 0.000000,0.000000  ""
+ set y2label "" 0.000000,0.000000  ""
+ set yrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
+ set y2range [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
+ set zlabel "" 0.000000,0.000000  ""
+ set zrange [ * : * ] noreverse nowriteback  # (currently [-10.0000:10.0000] )
+ set zero 1e-08
+ set lmargin -1
+ set bmargin -1
+ set rmargin -1
+ set tmargin -1
+ set locale "C"
+ plot '%BASEFILE%' using 1:2 title '%BENCHMARK% base (%BASE_CFLAGS%)' with linespoints, '%PEAKFILE%' using 1:2 title '%BENCHMARK% peak (%PEAK_CFLAGS%)' with linespoints
+ #    EOF
Index: spec/perfrc
===================================================================
RCS file: perfrc
diff -N perfrc
*** /dev/null	Tue May  5 13:32:27 1998
--- perfrc	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,164 ----
+ # (C) 2000, 2001 Free Software Foundation
+ # Originally by Diego Novillo <dnovillo@redhat.com>, Aug 2000.
+ #
+ # This script is Free Software, and it can be copied, distributed and
+ # modified as defined in the GNU General Public License.  A copy of
+ # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+ 
+ # Where SPEC lives.
+ export SPEC=${HOME}/perf/SPEC95
+ 
+ #------------------------------------------------------------------------------
+ # SANDBOX controls where things live.
+ # CVSROOT points to CVS repository.
+ # CVSMODULE is the module to check out from CVS.
+ # SRCDIR  points to directory created by 'cvs co'. This is a subdirectory of
+ #         SANDBOX.
+ #------------------------------------------------------------------------------
+ if [ "${SANDBOX}" = "" ] ; then
+     # First time. Initialize environment variables.
+     export CVSROOT=""
+     export CVSMODULE=""
+     export SRCDIR=""
+     if [ $# -lt 4 ] ; then
+ 	echo "usage: `basename $0` sandbox cvsroot cvsmodule srcdir"
+ 	echo
+ 	echo "'sandbox'   contains the source, build and log directories."
+ 	echo "'cvsroot'   is used to initialize CVSROOT."
+ 	echo "'cvsmodule' is the module name to check-out from CVS."
+ 	echo "'srcdir'    is the directory created by 'cvs co'. This is"
+ 	echo "                a sub-directory of 'sandbox'."
+ 	exit 1
+     fi
+ fi
+ 
+ # Set SANDBOX, CVSROOT, CVSMODULE and SRCDIR only if they're not set already.
+ if [ "${SANDBOX}" = "" ] ; then
+     if [ ! -d ${1} ] ; then
+ 	mkdir -p ${1} || exit 1
+     fi
+ 
+     # Re-write SANDBOX as an absolute pathname.
+     export SANDBOX=`(cd ${1} && echo ${PWD})`
+ fi
+ 
+ if [ "${CVSROOT}" = "" ] ; then
+     export CVSROOT=${2}
+ fi
+ 
+ if [ "${CVSMODULE}" = "" ] ; then
+     export CVSMODULE=${3}
+ fi
+ 
+ if [ "${SRCDIR}" = "" ] ; then
+     export SRCDIR=${4}
+ 
+     # Re-write SRCDIR as an absolute pathname.
+     export SRCDIR=${SANDBOX}/${SRCDIR}
+ fi
+ 
+ # Force path to a sane value.
+ export PATH=/bin:/usr/bin:/usr/local/bin
+ 
+ # Host information.
+ export HOST=`uname -n`
+ export HOSTTYPE=`uname -m`
+ 
+ # Dates for timestamping and reports.
+ date_raw=`date +%Y%m%d`
+ date_fmt=`date -d ${date_raw} +"%b %d, %Y"`
+ 
+ 
+ # Handle interruptions.
+ goaway() {
+     killall specmake specperl
+     finish 0
+ }
+ 
+ trap goaway SIGHUP
+ trap goaway SIGTERM
+ trap goaway SIGQUIT
+ trap goaway SIGINT
+ 
+ 
+ #------------------------------------------------------------------------------
+ # Directories.
+ #------------------------------------------------------------------------------
+ # All paths are defined in terms of these base directories.
+ scriptsdir=`dirname $0`
+ scriptsdir=`(cd ${scriptsdir} && echo ${PWD})`
+ sandboxarch=${SANDBOX}/${HOSTTYPE}
+ updatelogdir=${SANDBOX}/log/${date_raw}
+ installdir=${sandboxarch}/install-${date_raw}
+ builddir=${sandboxarch}/build
+ buildlogdir=${sandboxarch}/log/${date_raw}
+ specresultdir=${sandboxarch}/spec-result/${date_raw}
+ 
+ #-----------------------------------------------------------------------------
+ # Global settings.
+ #-----------------------------------------------------------------------------
+ nightlyspeclogfile=${updatelogdir}/nightlyspec-${date_raw}.log
+ 
+ #------------------------------------------------------------------------------
+ # CVS settings.
+ #------------------------------------------------------------------------------
+ export CVS_RSH=ssh
+ 
+ # SSH agent file (Assumed to have been generated by 'ssh-agent -s'). This
+ # is only needed by `update' if using ssh for CVS_RSH.
+ sshagentfile=${HOME}/.ssh/agent-${HOST}
+ 
+ # Alternatively, you can hardwire SSH_AUTH_SOCK and SSH_AGENT_PID here. Of
+ # course, there had better be an ssh-agent listening at this address.
+ # export SSH_AUTH_SOCK=/tmp/ssh-...
+ # export SSH_AGENT_PID=xxxx
+ 
+ # Log files.
+ updatelogfile=${updatelogdir}/update-${date_raw}.log
+ updateokfile=${updatelogdir}/update-${date_raw}.ok
+ updateerrfile=${updatelogdir}/update-${date_raw}.err
+ 
+ # Patch files.
+ gccdiff=${updatelogdir}/gcc-${date_raw}.diff
+ 
+ #------------------------------------------------------------------------------
+ # Build settings.
+ #------------------------------------------------------------------------------
+ buildlogfile=${buildlogdir}/build-${date_raw}.log
+ buildokfile=${buildlogdir}/build-${date_raw}.ok
+ 
+ 
+ #------------------------------------------------------------------------------
+ # SPEC settings.
+ #------------------------------------------------------------------------------
+ get_info() {
+     cat $1 | grep "^$2" | head -1 | awk -F: '{ gsub("^[ ]*", "", $2); print $2; }'
+ }
+ 
+ base_cflags="-O2"
+ peak_cflags="-O3"
+ ext=${HOSTTYPE}
+ cc=${installdir}/bin/gcc
+ model="IA-32 Dell Dimension 4100"
+ compiler="GCC as of ${date_fmt}"
+ os="`uname -sr`"
+ ncpu=`cat /proc/cpuinfo | grep '^processor' | wc -l`
+ cpu="`get_info /proc/cpuinfo 'model name'` at `get_info /proc/cpuinfo 'cpu MHz'` MHz"
+ cache="`get_info /proc/cpuinfo 'cache size'`"
+ memory="`get_info /proc/meminfo 'MemTotal'`"
+ specconfigskel=${scriptsdir}/gcc.cfg.skel
+ specconfigfile=${SPEC}/config/gcc.cfg
+ speclogfile=${buildlogdir}/spec-${date_raw}.log
+ specokfile=${buildlogdir}/spec-${date_raw}.ok
+ lockfile=${SANDBOX}/nightlyspec.lock
+ 
+ #------------------------------------------------------------------------------
+ # Report settings.
+ #------------------------------------------------------------------------------
+ # GNUPlot skeleton file.
+ gnuplotskelfile=${scriptsdir}/perf.plt.skel
+ 
+ # HTML directory and skeleton file.
+ htmldir=${HOME}/public_html/SPEC/`basename ${SANDBOX}`
+ htmlfile=${htmldir}/index.html
+ htmlskelfile=${scriptsdir}/report.html.skel
Index: spec/report
===================================================================
RCS file: report
diff -N report
*** /dev/null	Tue May  5 13:32:27 1998
--- report	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,112 ----
+ #!/bin/sh
+ #
+ # (C) 2000, 2001 Free Software Foundation
+ # Originally by Diego Novillo <dnovillo@redhat.com>, Aug 2000.
+ #
+ # This script is Free Software, and it can be copied, distributed and
+ # modified as defined in the GNU General Public License.  A copy of
+ # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+ 
+ source `dirname $0`/perfrc || exit 1
+ 
+ # Benchmark names.
+ names=`find ${SPEC}/benchspec/CINT*/* -type d -maxdepth 0 -printf '%f '`
+ 
+ # Change to SPEC results directory.
+ cd ${sandboxarch}/spec-result || exit 1
+ 
+ plotdir=plots
+ if [ ! -d ${plotdir} ] ; then
+     mkdir ${plotdir} || exit 1
+ fi
+ 
+ terminal="jpeg"
+ outfile=""		# Each benchmark file gets its own jpeg chart
+ 
+ # Generate performance charts for each benchmark
+ echo "Generating SPEC charts"
+ for d in ${names} ; do
+     echo "    $d"
+     basefile=${plotdir}/${d}-base.dat
+     peakfile=${plotdir}/${d}-peak.dat
+     plotfile=${plotdir}/${d}.plt
+ 
+     if [ "${terminal}" = "jpeg" ] ; then
+ 	outfile="\'${d}.jpg\'"
+     elif [ "${terminal}" = "postscript" ] ; then
+ 	outfile="\'${d}.ps\'"
+     fi
+ 
+     # Extract SPEC numbers from raw output file.
+     egrep -H "^${d}: base ratio" */CINT*.[0-9][0-9][0-9] | sed --expression="s%/CINT..\.[0-9][0-9][0-9]:${d}: base ratio% %;  /N\\/A/d; /0$/d" > ${basefile} || exit 1
+     egrep -H "^${d}: peak ratio" */CINT*.[0-9][0-9][0-9] | sed --expression="s%/CINT..\.[0-9][0-9][0-9]:${d}: peak ratio% %; /N\\/A/d; /0$/d" > ${peakfile} || exit 1
+ 
+     # Customize gnuplot skeleton file and plot results.
+     cat ${gnuplotskelfile} | sed --expression="\
+ 	s@%TITLE%@SPEC95 results for ${d}@g;\
+ 	s@%TERMINAL%@${terminal}@g;\
+ 	s@%OUTFILE%@${outfile}@g;\
+ 	s@%DATE%@${date_fmt}@g;\
+ 	s@%BENCHMARK%@${d}@g;\
+ 	s@%BASE_CFLAGS%@${base_cflags}@g;\
+ 	s@%PEAK_CFLAGS%@${peak_cflags}@g;\
+ 	s@%BASEFILE%@${basefile}@g;\
+ 	s@%PEAKFILE%@${peakfile}@g" > ${plotfile} || exit 1
+     gnuplot -persist ${plotfile}
+ done
+ echo
+ 
+ # Generate an HTML report and save it in ${htmldir}
+ if [ ! -d ${htmldir} ] ; then
+     echo
+     echo "Directory ${htmldir} does not exist. Creating."
+     mkdir -p ${htmldir} || exit 1
+ fi
+ 
+ dirs=`ls -1d */CINT*.[0-9][0-9][0-9] | awk -F'/' '{print $1}'`
+ 
+ start_date_raw=`echo ${dirs} | awk '{print $1}'`
+ start_date_fmt=`date --date=${start_date_raw} +"%b %d, %Y"`
+ 
+ end_date_raw=`echo ${dirs} | awk '{print $NF}'`
+ end_date_fmt=`date --date=${end_date_raw} +"%b %d, %Y"`
+ 
+ echo "Copying SPEC results to ${htmldir}"
+ echo
+ set -x
+ # Copy SPEC result files and charts.
+ # It doesn't matter if ${specresultdir} doesn't exist.
+ [ -d ${specresultdir} ] && cp -a ${specresultdir} ${htmldir}
+ cp -a *.jpg ${htmldir} || exit 1
+ 
+ # Copy some log files.
+ [ -f ${updatelogfile} ] && cp -a ${updatelogfile} ${htmldir}/${date_raw}/
+ [ -f ${gccdiff} ] && cp -a ${gccdiff} ${htmldir}/${date_raw}/
+ set +x
+ 
+ echo
+ echo "Generating HTML report ${htmlfile}"
+ cat ${htmlskelfile} | sed --expression="\
+     s@%START_DATE%@${start_date_fmt}@g;\
+     s@%END_DATE%@${end_date_fmt}@g; \
+     s@%MODEL%@${model}@g;\
+     s@%CPU%@${cpu}@g;\
+     s@%NCPU%@${ncpu}@g;\
+     s@%CACHE%@${cache}@g;\
+     s@%MEMORY%@${memory}@g;\
+     s@%OS%@${os}@g;\
+     s@%COMPILER%@${compiler}@g" \
+ > ${htmlfile} || exit 1
+ 
+ for date_raw in ${dirs} ; do
+     date_fmt=`date --date=${date_raw} +"%b %d, %Y"`
+     printf '<p><a href="%s">%s</a>\n' "${date_raw}" "${date_fmt}" >> ${htmlfile}
+ done
+ 
+ echo           >> ${htmlfile}
+ echo '</body>' >> ${htmlfile}
+ echo '</html>' >> ${htmlfile}
+ 
+ chmod -R a+rX ${htmldir}
+ 
+ exit 0
Index: spec/report.html.skel
===================================================================
RCS file: report.html.skel
diff -N report.html.skel
*** /dev/null	Tue May  5 13:32:27 1998
--- report.html.skel	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,86 ----
+ <html>
+ 
+ <title>
+ SPEC95 Nightly Testing
+ </title>
+ 
+ <body>
+ 
+ <center>
+ <h1>SPEC95 Nightly Testing</h1>
+ </center>
+ 
+ <center>
+ <h2>Testing period: %START_DATE% to %END_DATE%</h2>
+ </center>
+ 
+ <hr>
+ <center><b>Hardware Information</b></center>
+ 
+ <center><table BORDER NOSAVE>
+ <tr>
+ <th ALIGN=LEFT>Model Name</th>
+ <td>%MODEL%</td>
+ </tr>
+ 
+ <tr>
+ <th ALIGN=LEFT>CPU</th>
+ <td>%CPU%</td>
+ </tr>
+ 
+ <tr>
+ <th ALIGN=LEFT>FPU</th>
+ <td>Integrated</td>
+ </tr>
+ 
+ <tr>
+ <th ALIGN=LEFT>Number of CPUs</th>
+ <td>%NCPU%</td>
+ </tr>
+ 
+ <tr>
+ <th ALIGN=LEFT>Secondary Cache</th>
+ <td>%CACHE%</td>
+ </tr>
+ 
+ <tr>
+ <th ALIGN=LEFT>Memory</th>
+ <td>%MEMORY%</td>
+ </tr>
+ </table></center>
+ 
+ <center>
+ <p><b>Software Information</b></center>
+ 
+ <center><table BORDER NOSAVE>
+ <tr>
+ <th ALIGN=LEFT>Operating System</th>
+ <td>%OS%</td>
+ </tr>
+ 
+ <tr>
+ <th ALIGN=LEFT>Compiler</th>
+ <td>%COMPILER%</td>
+ </tr>
+ </table></center>
+ 
+ <p>
+ <hr>
+ <center>
+ <h2>Performance Results</h2>
+ </center>
+ 
+ <center>
+ <p><br><img SRC="099.go.jpg" HSPACE=5>
+ <p><br><img SRC="124.m88ksim.jpg" HSPACE=5>
+ <p><br><img SRC="126.gcc.jpg" HSPACE=5>
+ <p><br><img SRC="129.compress.jpg" HSPACE=5>
+ <p><br><img SRC="130.li.jpg" HSPACE=5>
+ <p><br><img SRC="132.ijpeg.jpg" HSPACE=5>
+ <p><br><img SRC="134.perl.jpg" HSPACE=5>
+ <p><br><img SRC="147.vortex.jpg" HSPACE=5>
+ <p>
+ <hr></center>
+ 
+ <center>
+ <h2>SPEC Result Files</h2></center>
Index: spec/update
===================================================================
RCS file: update
diff -N update
*** /dev/null	Tue May  5 13:32:27 1998
--- update	Mon Mar  5 15:53:23 2001
***************
*** 0 ****
--- 1,70 ----
+ #!/bin/sh
+ #
+ # (C) 2000, 2001 Free Software Foundation
+ # Originally by Diego Novillo <dnovillo@redhat.com>, Aug 2000.
+ #
+ # This script is Free Software, and it can be copied, distributed and
+ # modified as defined in the GNU General Public License.  A copy of
+ # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
+ 
+ source `dirname $0`/perfrc || exit 1
+ 
+ echo "Action:   Updating ${SRCDIR}"
+ echo "Start:    `date`"
+ echo "CVSROOT:  ${CVSROOT}"
+ echo "Module:   ${CVSMODULE}"
+ echo "Log:      ${updatelogfile}"
+ echo "Errors:   ${updateerrfile}"
+ 
+ if [ ! -d ${updatelogdir} ] ; then
+     echo
+     echo "Directory ${updatelogdir} doesn't exist. Creating."
+     mkdir -p ${updatelogdir} || exit 1
+ fi
+ 
+ # Set ssh-agent variables, if needed.
+ if [ "${CVS_RSH}" != "rsh" ] ; then
+     if [ -f ${sshagentfile} ] ; then
+ 	# Use the following if the agent file has been generated in C-shell
+ 	# syntax.
+ 	# tmpfile=`mktemp /tmp/ssh-agent.XXXXXX` || exit 1
+ 	# cat ${sshagentfile} | sed -e 's:;$::g;s:setenv :export :g;s:SSH_AUTH_SOCK :SSH_AUTH_SOCK=:g;s:SSH_AGENT_PID :SSH_AGENT_PID=:g' >${tmpfile}
+ 	# source ${tmpfile}
+ 	source ${sshagentfile}
+     elif [ "${SSH_AUTH_SOCK}" = "" -o "${SSH_AGENT_PID}" = "" ] ; then
+ 	echo
+ 	echo "File ${sshagentfile} does not exist."
+ 	echo "SSH agent variables SSH_AUTH_SOCK and SSH_AGENT_PID not set. Aborting."
+ 	exit 1
+     fi
+ fi
+ 
+ # Save the .diff since yesterday's update.
+ echo
+ set -x
+ cd ${SRCDIR}/gcc
+ cvs -d ${CVSROOT} diff -r BASE -r HEAD -cp >${gccdiff}
+ set +x
+ 
+ echo
+ set -x
+ cd ${SANDBOX}
+ cvs -d ${CVSROOT} co -P ${CVSMODULE} >${updatelogfile} 2>${updateerrfile}
+ status=$?
+ set +x
+ 
+ if [ ${status} -eq 0 ] ; then
+     touch ${updateokfile}
+ else
+     echo
+     echo "CVS update failed. Tail end of log file follows:"
+     echo
+     tail ${updateerrfile}
+ fi
+ 
+ rm -f ${tmpfile}
+ 
+ echo
+ echo "Finish:   `date`"
+ 
+ exit ${status}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]