Compiler performance tests on FreeBSD 10.0-CURRENT
Dimitry Andric
dimitry at andric.com
Sun Sep 16 11:32:27 UTC 2012
On 2012-09-16 07:25, Garrett Cooper wrote:
...
> If you can provide the tests, I can rerun it on some Nehalem class
> workstations I have access to. I unfortunately don't have access to
> SNB/Romley hardware yet.
I did these tests as follows:
- Install a recent -CURRENT snapshot on the box (or rebuild world and
kernel by hand and install them).
- Install Subversion.
- Checkout head sources into /usr/src, if not already there.
- Build GENERIC kernel with gcc, using default settings, and install it
into /boot/kernel.gcc.
- Build GENERIC kernel with clang, using default settings, and install
it into /boot/kernel.clang.
- Boot machine with either kernel, then run the attached runtest.sh
script, with the buildworld_{single,multi}.sh scripts in the same
directory. Save the resulting run-*.txt files in a directory that
indicates whether the kernel in use was built by gcc or by clang.
You can tweak the 'num_runs' variable at the top of runtest.sh to do
more runs, if the machine is fast. This should give more confidence in
the final statistics. I did just 3 runs on Gavin's machine, since it
took more than 7 hours for a single-threaded buildworld to complete.
Doing 6 runs should be more than enough.
The run-*.txt files contain the time(1) output of each run, and should
be processed through ministat to give average, stddev and so on. Just
send them to me, I will process them and summarize the statistics.
Alternatively, you can give me remote access, and I'll do it. :)
-------------- next part --------------
#!/bin/sh
mypath="${0%/*}"
num_runs=3
set -e
do_runtest() {
for i in $(jot ${num_runs}); do
rm -rf /usr/obj/*
sync
echo "Doing build $1, run $i..."
/usr/bin/time -l -o run-$1-$i.txt ${mypath}/build$1.sh > run-$1-$i.log
head -1 run-$1-$i.txt
done
}
do_runtest world_single
do_runtest world_multi
-------------- next part --------------
#!/bin/sh
set -e
cd /usr/src
make -s buildworld
-------------- next part --------------
#!/bin/sh
set -e
cd /usr/src
make -s -j8 buildworld
More information about the freebsd-current
mailing list