Date: Tue, 20 Feb 2007 02:06:53 +0800 From: Mayank Kumar <mayank@microsoft.com> To: Peter Jeremy <peterjeremy@optushome.com.au> Cc: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: RE: Questio on Gprof Message-ID: <76EBE649FB0E0E4DA883B5840459059F1438609BED@AA-EXMSG-C412.southpacific.corp.microsoft.com> In-Reply-To: <20070219081735.GE827@turion.vk2pj.dyndns.org> References: <76EBE649FB0E0E4DA883B5840459059F1438609B3C@AA-EXMSG-C412.southpacific.corp.microsoft.com> <20070219081735.GE827@turion.vk2pj.dyndns.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Peter, Thnks for all the info. I have the following questions:- 1:Are both the sources of data viz profil and .mcount absolutely necessary for gprof to work properly or it can do with only mcount data. From code it looks like both are necessary and complement each other in producing data required by Gprof. Just want to double check with you. 2: I understand that gprof relies on instrumentation by way of inserting Mcount calls and sampling by way of profil call. What I want to know is tha= t, is there an implementation of gprof or any other profiler for bsd or any= unixes which relies on instrumentation only by inserting probes at the hea= der and footer of the function ? Thanks Mayank -----Original Message----- From: Peter Jeremy [mailto:peterjeremy@optushome.com.au] Sent: Monday, February 19, 2007 1:48 PM To: Mayank Kumar Cc: freebsd-current@freebsd.org Subject: Re: Questio on Gprof [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 o= f hits by text address. This information is collected by the kernel - prof= il() just tells the kernel where to store the profiling samples. The secon= d source is caller/callee counts collected by .mcount in userland. I am unaware of any alternative to profil() - in theory, it could be implem= ented 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?76EBE649FB0E0E4DA883B5840459059F1438609BED>