This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFC: More control over which functions are instrumented
- From: Ian Lance Taylor <iant at google dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: 07 Aug 2007 16:46:58 -0700
- Subject: Re: PATCH RFC: More control over which functions are instrumented
- References: <m3wswfgg56.fsf@localhost.localdomain>
Ian Lance Taylor <iant@google.com> writes:
> This patch was developed a while back by Yaz Saito at Google. It adds
> two new options: -finstrument-functions-exclude-file-list and
> -finstrument-functions-exclude-function-list which give more control
> over which functions are instrumented.
I have committed this patch.
I also added some simple test cases, as follows.
Ian
2007-08-07 Ian Lance Taylor <iant@google.com>
* gcc.dg/instrument-1.c: New test.
* gcc.dg/instrument-2.c: New test.
* gcc.dg/instrument-3.c: New test.
instrument-1.c:
/* { dg-do compile } */
/* { dg-options "-finstrument-functions" } */
void fn () { }
/* { dg-final { scan-assembler "__cyg_profile_func_enter" } } */
/* { dg-final { scan-assembler "__cyg_profile_func_exit" } } */
instrument-2.c:
/* { dg-do compile } */
/* { dg-options "-finstrument-functions -finstrument-functions-exclude-function-list=fn" } */
void fn () { }
/* { dg-final { scan-assembler-not "__cyg_profile_func_enter" } } */
/* { dg-final { scan-assembler-not "__cyg_profile_func_exit" } } */
instrument-3.c:
/* { dg-do compile } */
/* { dg-options "-finstrument-functions -finstrument-functions-exclude-file-list=instrument-3" } */
void fn () { }
/* { dg-final { scan-assembler-not "__cyg_profile_func_enter" } } */
/* { dg-final { scan-assembler-not "__cyg_profile_func_exit" } } */