From owner-freebsd-current@FreeBSD.ORG Mon Feb 19 08:17:37 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3AA5C16A401 for ; Mon, 19 Feb 2007 08:17:37 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id B9A2E13C474 for ; Mon, 19 Feb 2007 08:17:36 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id l1J8HZne001367; Mon, 19 Feb 2007 19:17:35 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id l1J8HZlN001366; Mon, 19 Feb 2007 19:17:35 +1100 (EST) (envelope-from peter) Date: Mon, 19 Feb 2007 19:17:35 +1100 From: Peter Jeremy To: Mayank Kumar Message-ID: <20070219081735.GE827@turion.vk2pj.dyndns.org> References: <76EBE649FB0E0E4DA883B5840459059F1438609B3C@AA-EXMSG-C412.southpacific.corp.microsoft.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="KsGdsel6WgEHnImy" Content-Disposition: inline In-Reply-To: <76EBE649FB0E0E4DA883B5840459059F1438609B3C@AA-EXMSG-C412.southpacific.corp.microsoft.com> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: "freebsd-current@freebsd.org" Subject: Re: Questio on Gprof X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Feb 2007 08:17:37 -0000 --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 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--