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


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


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