Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Nov 2020 06:02:53 -0600
From:      Scott Bennett <bennett@sdf.org>
To:        ml@netfence.it
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Profiling C application
Message-ID:  <202011291202.0ATC2rbO024634@sdf.org>
In-Reply-To: <16423477-7854-20bf-58ff-c174375e37fe@netfence.it>
References:  <202011281922.0ASJMtiH020409@sdf.org> <16423477-7854-20bf-58ff-c174375e37fe@netfence.it>

next in thread | previous in thread | raw e-mail | index | archive | help
Andrea Venturoli <ml@netfence.it> wrote:

> 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.
>
     Bugzilla only turned up one PR that may have a bearing on that.  See
PR 198462 from 2017 and 10.1.  There's no sign that anyone, other than the poster
of the PR, even looked into it, an unfortunately common situation.
     Thank you for pointing out the problem.  Do you still have a test case you
could try?


                                  Scott Bennett, Comm. ASMELG, CFIAG
**********************************************************************
* Internet:   bennett at sdf.org   *xor*   bennett at freeshell.org  *
*--------------------------------------------------------------------*
* "A well regulated and disciplined militia, is at all times a good  *
* objection to the introduction of that bane of all free governments *
* -- a standing army."                                               *
*    -- Gov. John Hancock, New York Journal, 28 January 1790         *
**********************************************************************



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011291202.0ATC2rbO024634>