From owner-freebsd-hackers Mon Jul 31 12:21: 7 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mta4.rcsntx.swbell.net (mta4.rcsntx.swbell.net [151.164.30.28]) by hub.freebsd.org (Postfix) with ESMTP id 2635437BBE4 for ; Mon, 31 Jul 2000 12:20:59 -0700 (PDT) (envelope-from chris@holly.calldei.com) Received: from holly.calldei.com ([208.191.149.190]) by mta4.rcsntx.swbell.net (Sun Internet Mail Server sims.3.5.2000.01.05.12.18.p9) with ESMTP id <0FYK00LKSSRYYM@mta4.rcsntx.swbell.net> for freebsd-hackers@FreeBSD.ORG; Mon, 31 Jul 2000 13:59:58 -0500 (CDT) Received: (from chris@localhost) by holly.calldei.com (8.9.3/8.9.3) id NAA52895; Mon, 31 Jul 2000 13:57:06 -0500 (CDT envelope-from chris) Date: Mon, 31 Jul 2000 13:57:06 -0500 From: Chris Costello Subject: Re: Howto profile my code? In-reply-to: <39855E20.37377FF5@tornqvist.net> To: Bjorn Tornqvist Cc: freebsd-hackers@FreeBSD.ORG Reply-To: chris@calldei.com Message-id: <20000731135705.X37935@holly.calldei.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii User-Agent: Mutt/0.96.4i References: <39855E20.37377FF5@tornqvist.net> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, July 31, 2000, Bjorn Tornqvist wrote: > Howdy! > > Anyone know a working method to get profiling to work? (i.e. seeing > something like "method a::getValue() spent 12s Usertime, 3s Kerneltime" > etc). > > I've tried with > gcc -mprofiler-epilogue > but got the following linker error: > > MessageCenter.o: In function > `MessageCenter::OpenNewInput(basic_string string_char_traits, __default_alloc_template >)': > MessageCenter.o(.text+0x954): undefined reference to `mexitcount' > > So, searching the headers (in machine/asmacros.h) I found some reference > to GPROF so I tried to define it, but it still doesn't work. Actually: > the complete argumentlist to gcc is this: In the cc(1) man page, you can use -pg to create GNU gprof profiling output for your binary: -pg Generate extra code to write profile information suitable for the analysis program gprof. -- |Chris Costello |There are always at least two ways to program the same thing. `------------------------------------------------------------- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message