Profiling shared libraries
Ryan Stone
rysto32 at gmail.com
Sun Mar 30 14:07:34 UTC 2014
On Sat, Mar 29, 2014 at 10:43 PM, Daniel O'Connor <doconnor at 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
More information about the freebsd-hackers
mailing list