Questio on Gprof
Peter Jeremy
peterjeremy at optushome.com.au
Mon Feb 19 08:17:37 UTC 2007
[Please wrap your lines before 80 columns]
On 2007-Feb-18 22:08:17 +0800, Mayank Kumar <mayank at microsoft.com> wrote:
>I want to know if gprof's profling is solely dependent on the system
>call profil() or are there other implementations of gprof which do
>not depend on this system call.
gprof has two sources of data: Firstly sampling information giving
number of hits by text address. This information is collected by the
kernel - profil() just tells the kernel where to store the profiling
samples. The second source is caller/callee counts collected by
.mcount in userland.
I am unaware of any alternative to profil() - in theory, it could
be implemented in userland but the overheads would be extremely high.
>Also is there a profiler available for freebsd or any unix system
>which is based on instrumentation rather then sampling.
gprof relies on both instrumentatin and sampling. An alternative
would be gcov - though it reports line counts rather than execution
time statistics.
--
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070219/82bd0590/attachment.pgp
More information about the freebsd-current
mailing list