Profiling shared libraries
Daniel O'Connor
doconnor at gsoft.com.au
Tue Apr 1 02:00:19 UTC 2014
On 31 Mar 2014, at 0:37, Ryan Stone <rysto32 at gmail.com> wrote:
> 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
Great, thanks!
--
Daniel O'Connor software and network engineer
for Genesis Software - http://www.gsoft.com.au
"The nice thing about standards is that there
are so many of them to choose from."
-- Andrew Tanenbaum
GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20140401/2cdbe790/attachment.sig>
More information about the freebsd-hackers
mailing list