Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Sep 2012 13:32:23 +0200
From:      Dimitry Andric <dimitry@andric.com>
To:        Garrett Cooper <yanegomi@gmail.com>
Cc:        freebsd-current@freebsd.org, freebsd-toolchain@freebsd.org
Subject:   Re: Compiler performance tests on FreeBSD 10.0-CURRENT
Message-ID:  <5055B8C7.4030601@andric.com>
In-Reply-To: <CAGH67wSQ7OgOc%2BcRTey30hV2ouuh9XCTMbypFTjcsTWY5w%2B-8Q@mail.gmail.com>
References:  <50550285.4040203@andric.com> <20120916051909.GI37286@deviant.kiev.zoral.com.ua> <CAGH67wSQ7OgOc%2BcRTey30hV2ouuh9XCTMbypFTjcsTWY5w%2B-8Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------040306000003090409000501
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

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. :)

--------------040306000003090409000501
Content-Type: text/plain; charset=windows-1252;
 name="runtest.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="runtest.sh"

#!/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

--------------040306000003090409000501
Content-Type: text/plain; charset=windows-1252;
 name="buildworld_single.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="buildworld_single.sh"

#!/bin/sh
set -e
cd /usr/src
make -s buildworld

--------------040306000003090409000501
Content-Type: text/plain; charset=windows-1252;
 name="buildworld_multi.sh"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="buildworld_multi.sh"

#!/bin/sh
set -e
cd /usr/src
make -s -j8 buildworld

--------------040306000003090409000501--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5055B8C7.4030601>