This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: more problems with gprof


JSONCRAIG@aol.com 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 http://www.delorie.com/ and many other
places). 

   Linkname: GNU gprof - Table of Contents
   URL: http://www.delorie.com/gnu/docs/binutils/gprof_toc.html

> 
> Thanks,
> Jason Craig
> 

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]