Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Mar 2014 10:07:33 -0400
From:      Ryan Stone <rysto32@gmail.com>
To:        "Daniel O'Connor" <doconnor@gsoft.com.au>
Cc:        FreeBSD Hackers <freebsd-hackers@freebsd.org>
Subject:   Re: Profiling shared libraries
Message-ID:  <CAFMmRNzPrqzCz=wPegX6SsWQarLoR9rKWYukmiiz4WJiXDh30Q@mail.gmail.com>
In-Reply-To: <363F98EE-AF54-475D-AF4A-F99BD3D3CCF9@gsoft.com.au>

index | next in thread | previous in thread | raw e-mail

On Sat, Mar 29, 2014 at 10:43 PM, Daniel O'Connor <doconnor@gsoft.com.au> wrote:
> Hi,
> I have a shared library which is loaded into a Tcl interpreter and also loads submodules and I would like to profile it. Unfortunately it seems gprof does not grok shared libraries. I did some googling and it look like Linux has sprof for this but I can't see a port for FreeBSD.
>
> Does anyone have any other ideas?
> I have looked at DTrace but it's a bit fiddly to get working with my systems in the field so I'd prefer a pure userland solution if possible.
>
> Thanks

hwpmc can do it:

kldload hwpmc
pmcstat -S unhalted-cycles -O /tmp/samples.out sleep 10
pmcstat -R /tmp/samples.out -G /tmp/callgraph.txt


home | help

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