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


After hours of work, I managed to reduce my test case - to a trivial one. 
It is described in PR15022. The example is so trivial that I am surprised 
it did not come out before. Is it so rare to have something like "-100/a" 
with `a' being negative?

  Michael





Andreas Jaeger <aj@suse.de>
Sent by: gcc-owner@gcc.gnu.org
19/04/2004 23:28
 
        To:     Michael Veksler/Haifa/IBM@IBMIL
        cc:     gcc@gnu.org
        Subject:        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.



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