Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Nov 2020 10:55:47 +0100
From:      Andrea Venturoli <ml@netfence.it>
To:        Scott Bennett <bennett@sdf.org>, ihor@antonovs.family
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Profiling C application
Message-ID:  <16423477-7854-20bf-58ff-c174375e37fe@netfence.it>
In-Reply-To: <202011281922.0ASJMtiH020409@sdf.org>
References:  <202011281922.0ASJMtiH020409@sdf.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On 11/28/20 8:22 PM, Scott Bennett via freebsd-questions wrote:

>       I see you already have one response at least to your question, but
> perhaps a simpler one is to use a now ancient BSD UNIX tool called gprof(1),
> along with the compiler option -pg.  (See the gprof(1) man page for the
> details.)  Note, too, that you may want to link your program to the profiling
> versions of system libraries as explained in the man page.

I didn't mention gprof because it stopped working when FreeBSD switched 
from GCC to clang. Or, maybe, it was my fault, not being able to get it 
working again.

That was a long time ago, however; if nowadays it's a viable solution, 
I'm happy to hear this.

  bye & Thanks
	av.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?16423477-7854-20bf-58ff-c174375e37fe>