This is the mail archive of the 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 for "no_instrument_function" attribute

Andreas Jaeger wrote:
> Will Cohen <> writes:
> > The attribute "no_instrument_function" allows the support routines for
> > "-finstrument-functions" to be compiled with the same set of options
> > as other functions.  The operation of this attribute has been extended
> > to apply to "-p" and "-pg" options. This will make it much easier to
> > compile multilibs such as newlib and have the profiling support within
> > the
> > library. The profiling support functions should be compiled without
> > profiling. With this extension to the "no_instrument_function"
> > attribute the profiling support routines in the library will be
> > compiled correctly regardless of whether a profiling option is passed
> > to the compiler. Is it okay to apply this patch?
> Did you test it?  Please tell us how and where.

Yes, I did test it. The patched FSF gcc compiler bootstraps without
problem. This was on an RH 7.2 machine generating a native
i686-pc-linux-gnu compiler. I performed a "make compare"; that didn't
turn up any problems.  I also verified that the change disables the
profiling on a per function basis with a small test file.

> >       * function.h (struct function): Add profile.
> >       (current_function_profile): New.
> >       * function.c (expand_function_start): Add check to disable
> >       function profiling.
> >       * final.c (final_start_function): Check on per function basis.
> >       (profile_after_prologue): Likewise.
> >       (leaf_function_p): Likewise.
> Looking at your patch, you add documentation but you don't mention it
> here.  For GCC we require ChangeLog entry for the manual,

Change ommission on my part, bellow is the ChangeLog entry:

	* doc/extend.texi: Update behavior of "no_instrument_function"

> Andreas
> --
>  Andreas Jaeger
>   SuSE Labs
>    private

Will Cohen, GCC Engineer                         ------    ,__o
Red Hat, 2600 Meridian pkwy, Durham, NC 27713   ------   _-\_<,
Office (919)-547-0012 x390  Fax (919)-547-0024 ------   (*)/'(*)

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