public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Insert codes in "CFG"
@ 2011-11-09 17:36 Harry Trinta
  2011-11-09 22:14 ` Ian Lance Taylor
  0 siblings, 1 reply; 3+ messages in thread
From: Harry Trinta @ 2011-11-09 17:36 UTC (permalink / raw)
  To: gcc-help

Dear,

I would know how to include new statements in specific CFG blocks
during compilation. There are resources for this?
During the profile instrumentation, codes are included on the edges of
the CFG. How to include code in the block?
At first I want to include a line code in each block. This line will
call a function I created in libgcov. This function receive a
parameter of type int or unsigned.

Thanks,
Harry

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Insert codes in "CFG"
  2011-11-09 17:36 Insert codes in "CFG" Harry Trinta
@ 2011-11-09 22:14 ` Ian Lance Taylor
  2011-11-10 15:48   ` Harry Trinta
  0 siblings, 1 reply; 3+ messages in thread
From: Ian Lance Taylor @ 2011-11-09 22:14 UTC (permalink / raw)
  To: Harry Trinta; +Cc: gcc-help

Harry Trinta <harrytpc@gmail.com> writes:

> I would know how to include new statements in specific CFG blocks
> during compilation. There are resources for this?
> During the profile instrumentation, codes are included on the edges of
> the CFG. How to include code in the block?
> At first I want to include a line code in each block. This line will
> call a function I created in libgcov. This function receive a
> parameter of type int or unsigned.

I think the options here are writing a compiler plugin or modifying gcc
itself.  For information on plugins you can start at

http://gcc.gnu.org/onlinedocs/gccint/Plugins.html
http://gcc.gnu.org/wiki/plugins

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Insert codes in "CFG"
  2011-11-09 22:14 ` Ian Lance Taylor
@ 2011-11-10 15:48   ` Harry Trinta
  0 siblings, 0 replies; 3+ messages in thread
From: Harry Trinta @ 2011-11-10 15:48 UTC (permalink / raw)
  To: gcc-help

At first I am thinking in modifying the GCC. But I wonder if there are
features that help to add new statements on specific points of the
program (in this case, specific blocks of CFG.) I'll do it at the time
the compiler is inserting codes to profile.

Harry

2011/11/9 Ian Lance Taylor <iant@google.com>:
> Harry Trinta <harrytpc@gmail.com> writes:
>
>> I would know how to include new statements in specific CFG blocks
>> during compilation. There are resources for this?
>> During the profile instrumentation, codes are included on the edges of
>> the CFG. How to include code in the block?
>> At first I want to include a line code in each block. This line will
>> call a function I created in libgcov. This function receive a
>> parameter of type int or unsigned.
>
> I think the options here are writing a compiler plugin or modifying gcc
> itself.  For information on plugins you can start at
>
> http://gcc.gnu.org/onlinedocs/gccint/Plugins.html
> http://gcc.gnu.org/wiki/plugins
>
> Ian
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-10 13:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-09 17:36 Insert codes in "CFG" Harry Trinta
2011-11-09 22:14 ` Ian Lance Taylor
2011-11-10 15:48   ` Harry Trinta

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).