I'm trying to use gprof to get some performance data on a fairly large application. For every incoming connection, a new server process is forked; when the connection terminates, the child exits. I need to get profiling information for a single one of those forked children. I've re-compiled the application with "-pg", and I get a gmon.out file for each child. However, the problem is that the data seems to be incomplete: after I execute "gprof /path/to/profiled/executable /path/to/gmon.out", the output begins with:
And so on for a couple thousand lines (i.e. there is no timing data getting recorded; the names of the functions and the number of function calls seems to be correct, but without timing data it's not very useful). The child itself takes about 60 seconds to process the connection, so I know that something is definately wrong.
Any idea what I could be doing wrong?
TIA
Code:
Flat profile:
Each sample counts as 0.01 seconds.
no time accumulated
% cumulative self self total
time seconds seconds calls Ts/call Ts/call name
0.00 0.00 0.00 2687913 0.00 0.00 BufferGetBlockNumber
0.00 0.00 0.00 1225023 0.00 0.00 ReadBufferInternal
0.00 0.00 0.00 1223633 0.00 0.00 ReadBuffer
And so on for a couple thousand lines (i.e. there is no timing data getting recorded; the names of the functions and the number of function calls seems to be correct, but without timing data it's not very useful). The child itself takes about 60 seconds to process the connection, so I know that something is definately wrong.
Any idea what I could be doing wrong?
TIA