HP Fortran Programmer's Guide (March 2010)

Performance and optimization
Using profilers
Chapter 6 149
4. Once gprof is finished, you can view the output tables using an ASCII editor.
For more information about gprof, see the gprof(1) man page.
prof
The prof profiler can also be used for profiling. Unlike the gprof profiler, prof does not
generate the call graph profile. To use prof, do the following:
1. Compile the program with the +prof option. For example:
$ f90 -o prog +prof prog.f90
2. Run the program. This creates a file named mon.out in the current directory. For
example:
$ prog
$ ls mon.out
mon.out
3. Run prof, giving the name of the program as an argument, as follows:
$ prof prog
prof produces a listing on standard output showing the time spent in each routine.
For more information about prof, see the prof(1) man page.