[Bug gcov-profile/39220] New: -fprofile-generate and -fprofile-use are not equivalent to their component flags. Get directories wrong

2009-02-17 Thread jeremy at jeremybennett dot com
According to the GCC manual -fprofile-generate is equivalent to:

  -fprofile-arcs -fprofile-values -fvpt

Similarly -fprofile-use is equivalent to:

  -fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer

However if I use -fprofile-generate the .gcda/.gcno files are not generated in
the local directory, but only with process number specific names in ~/.ccache.
Similarly if I use -fprofile-use, it searches unsuccessfully in ~/.ccache.

However if I use the explicit sets of component flags, the .gcda/.gcno files
are created in the correct place and subsequently found correctly.

The attached is a tiny (two source file) program and script which demonstrates
this Use this script as follows:
1) ./script -fprofile-generate
2) ./script -fprofile-arcs -fprofile-values -fvpt

Observe that these should be equivalent, but only 2) generates the .gcda and
.gcno files in the correct place. 1) generates them in ~/.ccache with names
derived from process numbers.

Having run 2), try:
3) ./script -fprofile-use
4) ./script -fbranch-probabilities -fvpt -funroll-loops -fpeel-loops -ftracer

Observe that these should be equivalent, but 3) looks in the wrong place
(~/.ccache) for the profile data.

I feel this is such an obvious problem that it should have been already
reported, or I am missing something in the user manual. However an afternoon's
searching has been fruitless. Perhaps it is a peculiarity of GCC 4.3.0 on
Fedora 9.

Platform details (uname -a):

Linux thomas 2.6.27.12-78.2.8.fc9.i686 #1 SMP Mon Jan 19 20:14:35 EST 2009 i686
i686 i386 GNU/Linux

Compiler details (gcc -v):

Using built-in specs.
Target: i386-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla
--enable-bootstrap --enable-shared --enable-threads=posix
--enable-checking=release --with-system-zlib --enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk
--disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile --enable-java-maintainer-mode
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib
--with-cpu=generic --build=i386-redhat-linux
Thread model: posix
gcc version 4.3.0 20080428 (Red Hat 4.3.0-8) (GCC)


-- 
   Summary: -fprofile-generate and -fprofile-use are not equivalent
to their component flags. Get directories wrong
   Product: gcc
   Version: 4.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: gcov-profile
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jeremy at jeremybennett dot com
 GCC build triplet: i386-redhat-linux
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-redhat-linux


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39220



[Bug gcov-profile/39220] -fprofile-generate and -fprofile-use are not equivalent to their component flags. Get directories wrong

2009-02-17 Thread jeremy at jeremybennett dot com


--- Comment #1 from jeremy at jeremybennett dot com  2009-02-17 20:01 
---
Created an attachment (id=17314)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17314&action=view)
This is the trivial demonstrator and script

Use this script as described in the original report to demonstrate the problem.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39220



[Bug gcov-profile/39220] -fprofile-generate and -fprofile-use are not equivalent to their component flags. Get directories wrong

2009-02-18 Thread jeremy at jeremybennett dot com


--- Comment #4 from jeremy at jeremybennett dot com  2009-02-18 12:28 
---
Thanks for the advice. I had not realized that ccache was a separate program.
I've taken up the issue with them.

Jeremy


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39220



[Bug other/30369] New: installation with make profiledbootstrap fails

2007-01-04 Thread jeremy at jeremybennett dot com
Host OS Centos release 3.8 (i.e. the public rebuild of RHEL 3 release 8) on a
1.8GHz PentiumM laptop with 512MB RAM.

Details of existing GCC version:

Configured with: ../gcc-3.4.3/configure --enable-languages=c,c++
--enable-__cxa_atexit --disable-checking --prefix=/opt/gcc/gcc-3.4.3
Thread model: posix
gcc version 3.4.3

This was a profiled build of 4.1.1 from downloaded full source
(gcc-4.1.1.tar.bz2) in a clean directory. Within the "objdir" I used the
following commands.

$ ../gcc-4.1.1/configure --enable-languages=c,c++ --enable-__cxa_atexit
--disable-checking --prefix=/opt/gcc/gcc-4.1.1
$ make profiledbootstrap

There was no problem with configuring. "make" ran for around 10-15 minutes
until failing with:

 /home/jeremy/tools/gcc/builddir/./gcc/xgcc -shared-libgcc
-B/home/jeremy/tools/gcc/builddir/./gcc -nostdinc++
-L/home/jeremy/tools/gcc/builddir/i686-pc-linux-gnu/libstdc++-v3/src
-L/home/jeremy/tools/gcc/builddir/i686-pc-linux-gnu/libstdc++-v3/src/.libs
-B/opt/gcc/gcc-4.1.1/i686-pc-linux-gnu/bin/
-B/opt/gcc/gcc-4.1.1/i686-pc-linux-gnu/lib/ -isystem
/opt/gcc/gcc-4.1.1/i686-pc-linux-gnu/include -isystem
/opt/gcc/gcc-4.1.1/i686-pc-linux-gnu/sys-include -shared -nostdlib
/usr/lib/crti.o /home/jeremy/tools/gcc/builddir/./gcc/crtbeginS.o 
.libs/bitmap_allocator.o .libs/pool_allocator.o .libs/mt_allocator.o
.libs/codecvt.o .libs/compatibility.o .libs/complex_io.o .libs/ctype.o
.libs/debug.o .libs/debug_list.o .libs/functexcept.o .libs/globals_locale.o
.libs/globals_io.o .libs/ios.o .libs/ios_failure.o .libs/ios_init.o
.libs/ios_locale.o .libs/limits.o .libs/list.o .libs/locale.o
.libs/locale_init.o .libs/locale_facets.o .libs/localename.o .libs/stdexcept.o
.libs/strstream.o .libs/tree.o .libs/allocator-inst.o .libs/concept-inst.o
.libs/fstream-inst.o .libs/ext-inst.o .libs/ios-inst.o .libs/iostream-inst.o
.libs/istream-inst.o .libs/istream.o .libs/locale-inst.o
.libs/locale-misc-inst.o .libs/misc-inst.o .libs/ostream-inst.o
.libs/sstream-inst.o .libs/streambuf-inst.o .libs/streambuf.o
.libs/string-inst.o .libs/valarray-inst.o .libs/wlocale-inst.o
.libs/wstring-inst.o .libs/atomicity.o .libs/codecvt_members.o
.libs/collate_members.o .libs/ctype_members.o .libs/messages_members.o
.libs/monetary_members.o .libs/numeric_members.o .libs/time_members.o
.libs/basic_file.o .libs/c++locale.o -Wl,--whole-archive
../libmath/.libs/libmath.a ../libsupc++/.libs/libsupc++convenience.a
-Wl,--no-whole-archive 
-L/home/jeremy/tools/gcc/builddir/i686-pc-linux-gnu/libstdc++-v3/src
-L/home/jeremy/tools/gcc/builddir/i686-pc-linux-gnu/libstdc++-v3/src/.libs -lm
../libmath/.libs/libmath.a -lm ../libsupc++/.libs/libsupc++convenience.a -lm
-L/home/jeremy/tools/gcc/builddir/./gcc -lgcc_s -lc -lgcc_s -lm -lgcc_s -lc
-lgcc_s   /home/jeremy/tools/gcc/builddir/./gcc/crtendS.o /usr/lib/crtn.o 
-Wl,-O1 -Wl,--version-script=libstdc++-symbol.ver -Wl,-soname
-Wl,libstdc++.so.6 -o .libs/libstdc++.so.6.0.8
/usr/bin/ld: BFD 2.14.90.0.4 20030523 internal error, aborting at
../../bfd/elf32-i386.c line 2377 in elf_i386_relocate_section

/usr/bin/ld: Please report this bug.

collect2: ld returned 1 exit status
make[5]: *** [libstdc++.la] Error 1
make[5]: Leaving directory
`/home/jeremy/tools/gcc/builddir/i686-pc-linux-gnu/libstdc++-v3/src'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory
`/home/jeremy/tools/gcc/builddir/i686-pc-linux-gnu/libstdc++-v3'
make[3]: *** [all] Error 2
make[3]: Leaving directory
`/home/jeremy/tools/gcc/builddir/i686-pc-linux-gnu/libstdc++-v3'
make[2]: *** [all-target-libstdc++-v3] Error 2
make[2]: Leaving directory `/home/jeremy/tools/gcc/builddir'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/jeremy/tools/gcc/builddir'
make: *** [profiledbootstrap] Error 2


-- 
   Summary: installation with make profiledbootstrap fails
   Product: gcc
   Version: 4.1.1
Status: UNCONFIRMED
  Severity: blocker
  Priority: P3
 Component: other
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jeremy at jeremybennett dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30369



[Bug other/30369] installation with make profiledbootstrap fails

2007-01-04 Thread jeremy at jeremybennett dot com


--- Comment #1 from jeremy at jeremybennett dot com  2007-01-04 17:17 
---
I've found it's a binutils problem - probably my own fault when installing the
original GCC 3.4.3.


-- 

jeremy at jeremybennett dot com changed:

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution||INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30369