This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: -fprofile-generate and -fprofile-use
- From: Kelley Cook <kcook34 at ford dot com>
- To: girish_vaithees at yahoo dot com, gcc at gcc dot gnu dot org
- Date: Thu, 21 Jul 2005 14:03:20 -0400
- Subject: Re: -fprofile-generate and -fprofile-use
- Hop-count: 1
- References: <20050720233834.30683.qmail@web80006.mail.yahoo.com>
- Reply-to: kcook at gcc dot gnu dot org
I started with a clean slate in my build environment
and did not have any residual files hanging around.
Are the steps I have indicated in my earlier email
correct. Is there a way I can break down the problem
into a smaller sub-set of flags and eliminate the flag
causing the performance problem. What I mean is since
-fprofile-generate and -fprofile-use enable a bunch of
flags, would it make sense to avoid profiling and try
out some of the individual flags on a trial and error
basis. If so what would be the flags to start the
trials with.
-girish
Before we go any farther, are you sure that you are also turning on optimization with -fprofile-generate and -fprofile-use?
In other words, you aren't just using "gcc -fprofile-generate xxx.c" to create your object files are you?
You need to use something like "gcc -O2 -march=pentium4 -fprofile-generate" as unoptimized profiles are pretty pointless.
Instead of general terms, specific examples would help a lot. Like a link to your code that is having problems.
Kelley Cook