Profiler

A profiler is a tool for performance analysis of programs. A program is compiled with profiling enabled, and/or run under a profiler at runtime (depending on the implementation); the profiler then collects performance data while the program is running, such as how often each is called, how much time is spent in a function, and so on. The data is then presented to the programmer, allowing him to spend time optimising the parts of the program which take the most execution time.

Profiling should always be done before optimisation: programmers are notoriously bad at guessing where the bottlenecks in their programs are.

= Examples =


 * gprof
 * OProfile
 * Valgrind
 * Sun Performance Analyzer
 * Intel VTune
 * IBM (formerly Rational) Purify

= See also =


 * Wikipedia: Profiling, list of performance analysis tools