This is the mail archive of the gcc-patches@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: [PATCH] -mcount-nofp patch for committing


On Sat, Jan 03, 2009 at 11:18:13AM +0100, Paolo Bonzini wrote:
> 
> > +@item -mcount-nofp
> > +Don't force the frame counter with @option{-pg} function profiling.
> 
> Typo (-mmcount-nofp).

Thanks.

> 
> > +  if (flag_omit_frame_pointer && profile_flag && ix86_mcount_nofp)
> > +    targetm.profile_before_prologue = true;
> 
> Do you still need an error if -pg -fomit-frame-pointer is given without
> -mmcount-nofp?

I did it this way because you need a new glibc version, older versions
don't have the nofp hook. So if I didn't give the error and people
specified this accidentially they would get an obscure linker error
later. The idea was that only the new option requires the new glibc
version.


> > -  if (crtl->profile)
> > +  if (crtl->profile && targetm.profile_before_prologue && !ix86_mcount_nofp)
> 
> This is wrong, you can never have "targetm.profile_before_prologue &&
> !ix86_mcount_nofp" on e.g. Linux; you would remove the frame from
> profiled functions even without -mmcount-nofp.  Did you mean any of

The frame is still there for -fno-omit-frame-pointer -pg builds in 
my testing.

-Andi
-- 
ak@linux.intel.com


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