This is the mail archive of the
mailing list for the GCC project.
Re: Patch for "no_instrument_function" attribute
- From: Will Cohen <wcohen at redhat dot com>
- To: Andreas Jaeger <aj at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 18 Dec 2001 12:24:58 -0500
- Subject: Re: Patch for "no_instrument_function" attribute
- Organization: Red Hat, Inc.
- References: <3C1F75FC.5D236B26@redhat.com> <firstname.lastname@example.org>
Andreas Jaeger wrote:
> Will Cohen <email@example.com> 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 Jaeger
> SuSE Labs firstname.lastname@example.org
> private email@example.com
Will Cohen, GCC Engineer ------ ,__o
Red Hat, 2600 Meridian pkwy, Durham, NC 27713 ------ _-\_<,
Office (919)-547-0012 x390 Fax (919)-547-0024 ------ (*)/'(*)