This is the mail archive of the cygwin@cygwin.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: gprof prints incorrect results


Tim Prince wrote:
> I expect this would be improved if you built the entire run-time
> library with -pg.  The cygwin setup doesn't provide for
> automatically linking a profiling version of the run-time.  A
> possible work-around is to build a separate copy of the run-time
> libraries and link specifically against those libraries.

I think I shouldn't have to do this.  First, I don't need to do that
with the Linux version, so I don't see why it should be different on a
Windows version.  Second, I don't want profiling information for the
run-time library.  Here is an relevant excerpt of the gprof
documentation:

   If you compile only some of the modules of the program with `-pg',
   you can still profile the program, but you won't get complete
   information about the modules that were compiled without `-pg'.


> Recursive calling will be "spontaneous" no matter what
> you do.

Sorry to ask it that way but, did you really look at my example?  It
doesn't contain any recursive function, and it should be clear that the
DoSomething function doesn't use the run-time library, yet it's still
missing from the index.  I also had profiling outputs in which almost
all the index was missing (except for the title) for a program
containing thousands of functions.  This is clearly not expected.

I'll try to debug it myself.  If someone has any hint about the source
of the problem, please let me know.  And if someone out there really
obtained a useful (and complete) output from Cygwin's gprof, please let
me know too.  It could also be useful if you just tried my test on your
own system.

Thanks.

fc


Ref: http://www.cygwin.com/ml/cygwin/2001-07/msg01477.html




--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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