more problems with gprof

Mumit Khan
Tue Nov 30 23:39:00 GMT 1999 writes:
> Are -pg and gprof fully implemented in Mingw32?  I tried to profile a simple 
> C program (compiling/linking with -pg, running it, running gprof) and it 
> always says no time accumulated and 0% of the programs running time was spent
> in each function on the call graph.  Now, I know this can't be right because 
> they were all called multiple times.  

As always, please send me a testcase if you want me to look at it. The
implementation of gprof is pretty complete, but there may be a priority
issue for the thread that actually does the profiling. I'll see if up'ing
the thread priority will fix your problem or not.

> gprof -i test.exe returns:
> File `gmon.out' (version 0) contains:
>         3 histogram record
>         1 call-graph record
>         0 basic-block count records <----- is this the problem?
> Is it fully implemented or am I doing something wrong?

This looks ok to me. You should look at gcc's docs for profiling options
(not just -pg, but also a few others there as well), and docs for gprof
(I just realized that I missed the gprof docs in my distribution, but
you can get those online at and many other

   Linkname: GNU gprof - Table of Contents

> Thanks,
> Jason Craig


Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list