This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Multiple calls to __gcov_init
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Joe Buck <Joe dot Buck at synopsys dot COM>
- Cc: Richard Guenther <richard dot guenther at gmail dot com>, Momchil Velikov <velco at fadata dot bg>, gcc at gcc dot gnu dot org
- Date: Thu, 4 May 2006 14:46:07 +0200
- Subject: Re: Multiple calls to __gcov_init
- References: <444E1DE4.7040009@fadata.bg> <84fc9c000604250605g7345c220oa6587334db763fd4@mail.gmail.com> <20060425163920.GD746@synopsys.com>
> On Tue, Apr 25, 2006 at 03:05:26PM +0200, Richard Guenther wrote:
> > On 4/25/06, Momchil Velikov <velco@fadata.bg> wrote:
> > > Why does GCC emit multiple calls to __gcov_init, via mulitple (two) entries in
> > > the ctors table? For example "int foo () { return 0; }" compiled with "gcc -S
> > > -fprofile-generate" produces the following assembly file, where the ".ctors"
> > > section conrtains two entries.
> >
> > -funit-at-a-time fixes it. But who uses -fprofile-generate with -O0
> > these days...
>
> gcov is used for coverage testing, and these are best run at -O0.
coverage should be equivalent at -O0 and other levels now when profiling
is done early. I will try to look into how we end up with two inits.
(It would be however good idea to open the bug for it and assign it to
me so it won't get forgotten)
Honza