This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]