This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: fbranch-probabilities bug
- From: "Seongbae Park 박성배 朴成培" <seongbae dot park at gmail dot com>
- To: "Hariharan Sandanagobalane" <hariharans at picochip dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 8 Jan 2009 10:01:26 -0800
- Subject: Re: fbranch-probabilities bug
- References: <49660E18.30508@picochip.com>
This is the intended behavior, though now I see that the documentation
isn't very clear.
You need to use -fprofile-use - the typical usage scenario is to
compile with -fprofile-generate
to build an executable to do profile collection, and then compile with
-fprofile-use
to build optimized code using the profile data.
Seongbae
On Thu, Jan 8, 2009 at 6:30 AM, Hariharan Sandanagobalane
<hariharans@picochip.com> wrote:
> Hi Seongbae,
> I was doing some work on profiling for picochip, when i noticed what looks
> to me like a bug. It looks to me that using fbranch-probabilities on the
> commandline (after a round of profile-generate or profile-arcs) would just
> not work on any target. Reason..
>
> Coverage.c:1011
>
> if (flag_profile_use)
> read_counts_file ();
>
> Should this not be
>
> if (flag_profile_use || flag_branch_probabilities) // Maybe more flags
> read_counts_file ();
>
> ??
>
> Of course, i hit the problem later on since the counts were not read, it
> just assumed that the .gcda file were not available, when it actually was.
>
> Thanks
> Hari
>