This is the mail archive of the gcc@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]
Other format: [Raw text]

GCC-3.4.0/PCH - some numbers incl. a bug report


Hi,

I just reviewed the advantage PCH would offer for one of our C++
projects. So here are the build times (GNU/Linux, PowerPC, GCC-3.4.0):

A normal build without PCH:

 real    2m26.986s
 user    2m5.440s
 sys     0m12.120s

a build including PCH generation:

 real    4m6.156s
 user    3m32.030s
 sys     0m23.940s

a build using the existing PCH from the previous build:

 real    2m4.426s
 user    1m44.230s
 sys     0m10.840s

So we get a 15% speedup for subsequent build - with a 67% slowdown for
the first build. Are this expected numbers?

The .gch files are rather huge:

 $ du -ch `find -name *.gch`
 ...
 399M    total

And last but not least a problem arising with one file:

 ../include/ALSAConverter.hh:34:53: calling fdopen: Bad file descriptor

Sorry, I have no tiny, stripped down, example how to reproduce
this. The .gch seems to be valid - and all compiles fine - except I
had to add || true to the PCH generation command in the Makefile ...

I have not been able to track this problem. The strace call sequence is:

26678 fstat(5, {st_mode=S_IFREG|0644, st_size=32053, ...}) = 0
26678 read(5, "// istream classes -*- C++ -*-\n\n"..., 32053) = 32053
26678 close(5)                          = 0
26678 mmap(NULL, 65536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x30824000

... more mmap's skipped ...

26678 fcntl64(-1, F_GETFL)              = -1 EBADF (Bad file descriptor)
26678 write(2, "In file included from ../include"..., 51) = 51
26678 write(2, ":\n", 2)                = 2
26678 write(2, "../include/ALSAConverter.hh:37:5"..., 34) = 34
26678 write(2, " ", 1)                  = 1
26678 write(2, "calling fdopen: Bad file descrip"..., 35) = 35
26678 write(2, "\n", 1)                 = 1
26678 close(-1)                         = -1 EBADF (Bad file descriptor)

The source can be obtained at (it is in refactoring state - so do not
execpt to get a full-featured digital audio workstation yet):

  http://svn.rocklinux-consulting.de/gsmp/trunk/

Sincerely yours,
  René Rebe
    - ROCK Linux stable release maintainer

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene@rocklinux-consulting.de
http://www.rocklinux.org http://www.rocklinux-consulting.de


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