This is the mail archive of the
mailing list for the GCC project.
Re: gcc compile-time performance
From: Marc Espie <firstname.lastname@example.org>
Date: Sun, 19 May 2002 07:59:13 +0200
On Sat, May 18, 2002 at 09:24:25PM -0700, David S. Miller wrote:
> Hey Marc, could you run your tests with this patch applied
> to gcc-3.1? It should kill ~10% or more of the compile time
> overhead when optimizations are enabled.
Not significant on x86... not more than 2 seconds difference, out of
several minutes, both in -O2 and -O1 mode.
Thanks for the test.
I wonder how hard it would be for you to build 'cc1' with
the gcov options enabled ("-fprofile-arcs -ftest-coverage")
and then tar up the foo.gcov files after building each part
of the BSD kernel.
I suppose one could write a shell script that did:
1) Run GCC with $* as options.
2) Tar up *.gcov files into uniquely named tar file.
and then you could set "CC" to this script during your
build to generate all the profiling data.
Make sure you have a lot of disk space available if you
attempt this :-)
Something similar can be done to generate gprof information