[lug] Program timing

David Morris lists at morris-clan.net
Wed Sep 10 08:53:00 MDT 2008


On Tue, Sep 9, 2008 at 8:12 AM, Stephen Queen <svqueen at gmail.com> wrote:
> I'm sure I've seen this discussed on this list before, I just don't
> seem to be able to find it in the archives.
> I'm looking for a program that can display the timing of various
> functions in a user space program. Does anyone have a recommendation
> or suggestion?

As already noted, gprof is the standard basic profiling tool for
anything compiled with gcc/g++.

I frequently use Valgrind (the 'callgrind' tool), particularly on
large applications because it offers better control of the profiling
and better visualization/browsing of the results.  Valgrind also
doesn't need a special recompile of the code.

http://valgrind.org/

--David



More information about the LUG mailing list