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]

Re: -profile-use: "has overflowed" error


Michael Veksler <VEKSLER@il.ibm.com> writes:

> While trying to do profiled based optimization with gcc-3.4, I got the 
> following error:
>         $ g++ -O2 -Werror -c -DNDEBUG -fprofile-use file.cpp
>         file.cpp:1: error `file.gcda' has overflowed
>         $ g++ -v
>         Reading specs from 
> /home/veksler/gcc/lib/gcc/i686-pc-linux-gnu/3.4.0/specs
>         Configured with: ../gcc-3.4.0-20040406/configure 
> --prefix=/home/veksler/gcc --enable-languages=c++
>         Thread model: posix
>         gcc version 3.4.0 20040407 (prerelease)
>
> Is it normal behavior in some cases or is it a bug in gcc-3.4?
> I guess that I can remove file.gcda, and go on with the compilation, but 
> that is a major incontinence in an automated build system.
> I tried to look this up in gcc.gnu.org search. All I could find was a 
> patch by Jan Hubicka on Dec 2003, that made this error more informative 
> than it used to be (and produced an error instead of a plain warning).
>
> My guess is that some of the profiling counters are 32 bit, and my code 
> (which runs many seconds) covers the same arc too many times. In that 
> case, it is a bug in profiling code. I think that either the counters 
> should be 64 bit (which may be too expensive), or they should not wrap 
> around (and stop at  (~(counter_type)0) ).
>
> Am I correct? Should I open a PR?
> I can't send offending code because:
>  1. It is too big
>  2. I am not allowed to.
> I could and try to reproduce it in a special test case - if I knew what 
> the error was about.

If you have code that you can send, please open a PR.  Otherwise, I
don't think there's much that can be done.

Andreas
-- 
 Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
  SuSE Linux AG, Maxfeldstr. 5, 90409 Nürnberg, Germany
   GPG fingerprint = 93A3 365E CE47 B889 DF7F  FED1 389A 563C C272 A126

Attachment: pgp00000.pgp
Description: PGP signature


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