Tech and Academic things for Chianshin

Friday, October 12, 2007

Timing and Profiling on Cobalt, an Overview

Timing and Profiling on Cobalt, an Overview: "called"
An undocumented GMON environment variable is GMON_OUT_PREFIX. When profiling a threaded or MPI code, each process will generate a gmon file called $GMON_OUT_PREFIX.pid. Each gmon file can then be analyzed seperately or the aggregate sum can be produced by gmon and examined as a whole:
% gprof -s $GMON_OUT_PREFIX.*
% gprof a.out gmon.sum

===============================================================
ohar Levi wrote:

> when I run test it generates the gmon.out, but gprof
> complains:
>
> gprof: gmon.out file is missing call-graph data

It's complaining because there is no call-graph info because your
trivial testcase only has a single function. If you run it on a
non-trivial testcase, or if you ask for a flat profile (-p) it will work
fine.

The following thread explains the problem and includes a patch which
changes the default behavior in this situation to -p. Note that gprof
is part of binutils and not part of gcc and questions about it are
better suited for the binutils list.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]



<< Home