This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: profiling API?
- From: fche at redhat dot com (Frank Ch. Eigler)
- To: Nick Clifton <nickc at redhat dot com>
- Cc: William Brodie-Tyrrell <william at cs dot adelaide dot edu dot au>, binutils at sources dot redhat dot com, <gcc at gnu dot org>
- Date: 13 Mar 2003 13:48:45 -0500
- Subject: Re: profiling API?
- References: <Pine.SOL.4.44L0.0303041554180.4597-100000@helium.cs.adelaide.edu.au><m3vfyn9mxo.fsf@workshop.nickc.cambridge.redhat.com>
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