diff options
author | klarlund <klarlund@gmail.com> | 2008-05-29 02:04:55 +0000 |
---|---|---|
committer | klarlund <klarlund@gmail.com> | 2008-05-29 02:04:55 +0000 |
commit | e3216d01c369914410c7a6cd56eeef56c725f1e8 (patch) | |
tree | 99c836858aac8a6e611a96521697b770cb8c5a6b | |
parent | c37e5150d1d66ce3cb7f9cd68d75bfd68aea4cee (diff) | |
download | distcc-git-e3216d01c369914410c7a6cd56eeef56c725f1e8.tar.gz |
Add include server args to benchmarking framework.
This makes the linux kernel build with pump-mode when the benchmark script is
used.
Also, include the '-t' option to the include server; that prints out the elapsed
and CPU times at the end of the build.
REVIEW: csilvers@google.com
TESTS: (on quad-cpu workstation)
DISTCC_HOSTS="--randomize `/home/klarlund/svn-distcc/distcc/lsdistcc -P1 -k100 -d`" PATH=`pwd`:$PATH bench/benchmark.py --cc='/usr/crosstool/v10/gcc-4.2.1-glibc-2.3.2/x86_64-unknown-linux-gnu/bin/x86_64-unknown-linux-gnu-gcc' --cxx='void' -n 5 -c 'pump,h40,j120' -c 'dist,h40,j32' linux-2.6.25
project compiler time s.d.
linux-2.6.25 pump_h39_j120 69.6525s 3.0969s
linux-2.6.25 dist_h39_j32 103.8416s 10.8041s
-rwxr-xr-x | bench/Build.py | 2 | ||||
-rwxr-xr-x | bench/Project.py | 7 | ||||
-rwxr-xr-x | bench/ProjectDefs.py | 1 |
3 files changed, 8 insertions, 2 deletions
diff --git a/bench/Build.py b/bench/Build.py index 8e765b9..91ef36c 100755 --- a/bench/Build.py +++ b/bench/Build.py @@ -150,10 +150,12 @@ class Build: self.compiler.host_opts) cmd = ("cd %s && \\\n" "DISTCC_HOSTS='%s' \\\n" + "INCLUDE_SERVER_ARGS='-t %s' \\\n" "%s%s \\\nDISTCC_LOG='%s' \\\nCC='%s' \\\nCXX='%s' " "\\\n%s \\\n>%s 2>&1" % (self.build_dir, distcc_hosts, + self.project.include_server_args, self.compiler.pump_cmd, self.project.build_cmd, distcc_log, diff --git a/bench/Project.py b/bench/Project.py index 0b89f77..1c6178f 100755 --- a/bench/Project.py +++ b/bench/Project.py @@ -45,7 +45,8 @@ class Project: build_subdir=None, configure_cmd=None, pre_build_cmd = None, - build_cmd=None): + build_cmd=None, + include_server_args=""): """Specification of a project to build. url: the url to download the file. @@ -72,6 +73,8 @@ class Project: We add VAR=val arguments, so build_cmd must be a single command that is either a form of 'make', or takes the same style arguments. Defaults to 'make'. + include_server_args: include server tweaks such as stat reset triggers + for builds that modify source files. """ self.url = url @@ -99,7 +102,7 @@ class Project: # TODO(csilvers): figure out automatically if only one TLD. self.unpacked_subdir = unpacked_subdir or self.name self.build_subdir = build_subdir - + self.include_server_args = include_server_args def register(self): trees[self.name] = self diff --git a/bench/ProjectDefs.py b/bench/ProjectDefs.py index 46a123d..9e51602 100755 --- a/bench/ProjectDefs.py +++ b/bench/ProjectDefs.py @@ -73,6 +73,7 @@ Project(url='http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.25.tar.bz2', md5='db95a49a656a3247d4995a797d333153 *linux-2.6.25.tar.bz2', configure_cmd="make V=1 HOSTCC='$(CC)' defconfig", build_cmd="make V=1 HOSTCC='$(CC)' bzImage", + include_server_args='--stat_reset_triggers=include/linux/compile.h:include/asm/asm-offsets.h' ).register() Project(url='http://sources-redhat.oc1.mirrors.redwire.net/gdb/old-releases/gdb-5.3.tar.gz', |