Date: Mon, 31 Jul 2000 13:57:06 -0500 From: Chris Costello <chris@calldei.com> To: Bjorn Tornqvist <bjorn@tornqvist.net> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Howto profile my code? Message-ID: <20000731135705.X37935@holly.calldei.com> In-Reply-To: <39855E20.37377FF5@tornqvist.net> References: <39855E20.37377FF5@tornqvist.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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<char,
> string_char_traits<char>, __default_alloc_template<true, 0> >)':
> 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 <chris@calldei.com>
|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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000731135705.X37935>
