public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: gcc-patches@gcc.gnu.org
Subject: Re: PATCH RFC: More control over which functions are instrumented
Date: Tue, 07 Aug 2007 23:48:00 -0000	[thread overview]
Message-ID: <m3odhilxfx.fsf@localhost.localdomain> (raw)
In-Reply-To: <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" } } */

      parent reply	other threads:[~2007-08-07 23:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-01 20:22 Ian Lance Taylor
2007-08-01 21:26 ` Andrew Pinski
2007-08-01 21:51   ` Ian Lance Taylor
2007-08-01 21:59     ` Andrew Pinski
2007-08-07 23:48 ` Ian Lance Taylor [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3odhilxfx.fsf@localhost.localdomain \
    --to=iant@google.com \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).