Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Feb 2007 19:17:35 +1100
From:      Peter Jeremy <peterjeremy@optushome.com.au>
To:        Mayank Kumar <mayank@microsoft.com>
Cc:        "freebsd-current@freebsd.org" <freebsd-current@freebsd.org>
Subject:   Re: Questio  on Gprof
Message-ID:  <20070219081735.GE827@turion.vk2pj.dyndns.org>
In-Reply-To: <76EBE649FB0E0E4DA883B5840459059F1438609B3C@AA-EXMSG-C412.southpacific.corp.microsoft.com>
References:  <76EBE649FB0E0E4DA883B5840459059F1438609B3C@AA-EXMSG-C412.southpacific.corp.microsoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--KsGdsel6WgEHnImy
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

[Please wrap your lines before 80 columns]

On 2007-Feb-18 22:08:17 +0800, Mayank Kumar <mayank@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
=2Emcount 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.

--=20
Peter Jeremy

--KsGdsel6WgEHnImy
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)

iD8DBQFF2V0f/opHv/APuIcRAmpOAKCij4vz3PaacoZwyAZqJ3CFX5FA8gCgulAq
QsZu8NQDqER8StOAcO+40nU=
=IQvA
-----END PGP SIGNATURE-----

--KsGdsel6WgEHnImy--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070219081735.GE827>