public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* profiling API?
@ 2003-03-04  5:54 William Brodie-Tyrrell
  2003-03-13 19:26 ` Nick Clifton
  0 siblings, 1 reply; 5+ messages in thread
From: William Brodie-Tyrrell @ 2003-03-04  5:54 UTC (permalink / raw)
  To: binutils, gcc


I'd like to profile small(ish) portions of the execution of a program
rather than the whole thing as it has a few behaviour phase changes and I
want to profile one mode.

Is there any way to get multiple gmon.out files for a given execution?
Being able to get the output at arbitrary times (eg on receipt of a
signal) would be sufficient, but it would be even better if the program
could control its own profiling.



PS: I'm not subscribed to the binutils mailing list, so please include me
in any replies.

William Brodie-Tyrrell

-- 
I wouldn't eat dolphin.  I refuse to eat anything smarter than me.
Which is why I abstain from broccoli.
	-- <jre>

<william@cs.adelaide.edu.au>
http://www.cs.adelaide.edu.au/~william
Room 3034, Plaza Building


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

* Re: profiling API?
  2003-03-04  5:54 profiling API? William Brodie-Tyrrell
@ 2003-03-13 19:26 ` Nick Clifton
  2003-03-13 23:39   ` William Brodie-Tyrrell
  2003-05-12 19:48   ` Frank Ch. Eigler
  0 siblings, 2 replies; 5+ messages in thread
From: Nick Clifton @ 2003-03-13 19:26 UTC (permalink / raw)
  To: William Brodie-Tyrrell; +Cc: binutils, gcc

Hi William,

> I'd like to profile small(ish) portions of the execution of a
> program rather than the whole thing as it has a few behaviour phase
> changes and I want to profile one mode.
> 
> Is there any way to get multiple gmon.out files for a given
> execution?

No. :-(

> Being able to get the output at arbitrary times (eg on
> receipt of a signal) would be sufficient, but it would be even
> better if the program could control its own profiling.

You can compile only certain files with profiling enabled.  That way
you will only generate profile information for the functions in those
files, (plus any functions that they call...)

You might also consider using the -finstrument-functions command line
switch and writing your own profiling tools.

Cheers
        Nick

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

* Re: profiling API?
  2003-03-13 19:26 ` Nick Clifton
@ 2003-03-13 23:39   ` William Brodie-Tyrrell
  2003-03-14 12:10     ` Rob Taylor
  2003-05-12 19:48   ` Frank Ch. Eigler
  1 sibling, 1 reply; 5+ messages in thread
From: William Brodie-Tyrrell @ 2003-03-13 23:39 UTC (permalink / raw)
  To: Nick Clifton; +Cc: binutils, gcc


Stoned koalas drooled eucalyptus spit in awe as Nick Clifton declaimed:

> > Is there any way to get multiple gmon.out files for a given
> > execution?
>
> No. :-(

oh well.

> You can compile only certain files with profiling enabled.  That way
> you will only generate profile information for the functions in those
> files, (plus any functions that they call...)

yep, been doing that.  What I'd hoped for was to divide the results up by
time.

> You might also consider using the -finstrument-functions command line
> switch and writing your own profiling tools.

haha.  surely you jest :)   I'm having a bad enough time getting the code
I *need* done in time :(


thanks for the help, anyway.

William Brodie-Tyrrell

-- 
I wouldn't eat dolphin.  I refuse to eat anything smarter than me.
Which is why I abstain from broccoli.
	-- <jre>

<william@cs.adelaide.edu.au>
http://www.cs.adelaide.edu.au/~william
Room 3034, Plaza Building


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

* RE: profiling API?
  2003-03-13 23:39   ` William Brodie-Tyrrell
@ 2003-03-14 12:10     ` Rob Taylor
  0 siblings, 0 replies; 5+ messages in thread
From: Rob Taylor @ 2003-03-14 12:10 UTC (permalink / raw)
  To: William Brodie-Tyrrell, Nick Clifton; +Cc: binutils, gcc

try
http://sourceforge.net/projects/fnccheck/

*may* need some work to work with 3.x, but let me know if you can get it
working!!

Rob Taylor          mailto:robt@flyingpig.com
Flying Pig Systems  http://www.flyingpig.com
Tel:                +44 20 8280 9230


> -----Original Message-----
> From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org]On Behalf Of
> William Brodie-Tyrrell
> Sent: 13 March 2003 23:17
> To: Nick Clifton
> Cc: binutils@sources.redhat.com; gcc@gnu.org
> Subject: Re: profiling API?
>
>
>
> Stoned koalas drooled eucalyptus spit in awe as Nick Clifton declaimed:
>
> > > Is there any way to get multiple gmon.out files for a given
> > > execution?
> >
> > No. :-(
>
> oh well.
>
> > You can compile only certain files with profiling enabled.  That way
> > you will only generate profile information for the functions in those
> > files, (plus any functions that they call...)
>
> yep, been doing that.  What I'd hoped for was to divide the results up by
> time.
>
> > You might also consider using the -finstrument-functions command line
> > switch and writing your own profiling tools.
>
> haha.  surely you jest :)   I'm having a bad enough time getting the code
> I *need* done in time :(
>
>
> thanks for the help, anyway.
>
> William Brodie-Tyrrell
>
> --
> I wouldn't eat dolphin.  I refuse to eat anything smarter than me.
> Which is why I abstain from broccoli.
> 	-- <jre>
>
> <william@cs.adelaide.edu.au>
> http://www.cs.adelaide.edu.au/~william
> Room 3034, Plaza Building
>

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

* Re: profiling API?
  2003-03-13 19:26 ` Nick Clifton
  2003-03-13 23:39   ` William Brodie-Tyrrell
@ 2003-05-12 19:48   ` Frank Ch. Eigler
  1 sibling, 0 replies; 5+ messages in thread
From: Frank Ch. Eigler @ 2003-05-12 19:48 UTC (permalink / raw)
  To: Nick Clifton; +Cc: William Brodie-Tyrrell, binutils, gcc


nickc wrote:

> > I'd like to profile small(ish) portions of the execution of a
> > program rather than the whole thing as it has a few behaviour phase
> > changes and I want to profile one mode.
> > 
> > Is there any way to get multiple gmon.out files for a given
> > execution?
> 
> No. :-(
> [...]

Depending on the details of your particular gprof runtime, a program
might be able to call a sequence like the following to get multiple
cumulative profile snapshots:

     _mcleanup ();  /* suspend profiling, write gmon.out */
     rename ("gmon.out", "gmon.out.NNN" );
     moncontrol (1); /* resume profiling */

- FChE

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

end of thread, other threads:[~2003-05-12 19:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-04  5:54 profiling API? William Brodie-Tyrrell
2003-03-13 19:26 ` Nick Clifton
2003-03-13 23:39   ` William Brodie-Tyrrell
2003-03-14 12:10     ` Rob Taylor
2003-05-12 19:48   ` Frank Ch. Eigler

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