This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: profiling API?
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