next up previous contents
Next: CGI programming in Free Up: Debugging your Programs Previous: Caveats when debugging with

Support for gprof, the gnu profiler

 

You can compile your programs with profiling support. for this, you just have to use the compiler switch -pg. The compiler wil insert the necessary stuff for profiling.

When you have done this, you can run your program uder the gnu profiler, gprof, as follows :

gprog yourexe
Where yourexe is the name of your executable.

You may want to capture the outpus of the profiler in a file, since it can be quite a lot, as follows:

gprog yourexe >gprof.out

For more information on the gnu profiler gprof, see its manual.



Michael Van Canneyt
Thu Sep 10 13:56:17 CEST 1998