From: sct@dcs.ed.ac.uk (Stephen Tweedie) Subject: Re: [Q]: gprof -- time is always 0 Date: 6 May 1993 11:43:16 GMT
On 4 May 93 23:52:56 GMT, guentbru@hercules.cs.uregina.ca (Bruce Guenter) said:
> I've gotten code to compile with the -pg options, and link, and run,
> and gprof even emits semi-resonable data. The problem is that the time
> indicators given by gprof are always 0. Why? That is the primary reason
> I'd use a profiler. It does get the number of calls/routine right, but
> that's pretty meaningless unless accompanied by a time indication.
Odd - I've never had any trouble with this.
First of all, are you sure you are using the -pg option for both
compiling and linking?
Secondly, you might be missing the /usr/lib/libc_p.a; I am still using
the one from libc.so.4.2.2.
You ought to be able to get it all running, but I don't know exactly
what you'll have to do - the first time I ever tried to profile code
under Linux it worked without a hitch.
Cheers,
Stephen Tweedie.