Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Apr 2011 22:16:11 -0400
From:      Alexander Kabaev <kabaev@gmail.com>
To:        Chuck Tuffli <ctuffli@gmail.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: no KLD symbols in dtrace?
Message-ID:  <20110421221611.7f52ca98@kan.dnsalias.net>
In-Reply-To: <BANLkTi=iDhVTsdZLrFy6JohSRBexAhWyJA@mail.gmail.com>
References:  <BANLkTi=iDhVTsdZLrFy6JohSRBexAhWyJA@mail.gmail.com>

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

[-- Attachment #1 --]
On Thu, 21 Apr 2011 18:37:24 -0700
Chuck Tuffli <ctuffli@gmail.com> wrote:

> (Note I'm new to DTrace, so this may be ignorance on my part)
> 
> I have re-built a stock 8.2 kernel and enabled dtrace as per the
> handbook (including WITH_CTF=1) and have built a kld also using
> WITH_CTF=1. When I run the following
> 
> dtrace -n"bus_release_resource:entry { stack(); }"
> 
> the output looks like
> ...
>   0  33759       bus_release_resource:entry
>               0xffffffff813db04e
>               0xffffffff813db091
>               kernel`device_detach+0x84
>               kernel`driver_module_handler+0x37c
>               kernel`module_unload+0x49
>               kernel`linker_file_unload+0x178
>               kernel`kern_kldunload+0x117
>               kernel`syscallenter+0x23d
>               kernel`syscall+0x4b
>               kernel`0xffffffff808c5572
> 
> where the 0xffffffff813dbXXX addresses correspond to my kld. But I was
> expecting to see symbolic names instead of addresses. Is there
> something else I need to do to add the kld's symbols to the system?
> TIA.
> 

There is an omission on our .mk files which prevents CTF info to be
generated for kld modules, regardless of WITH_CTF flag. I had
discovered this at work just recently and have been using the
following patch for the time being:

http://people.freebsd.org/~kan/kmod-dtrace.diff

If you can confirm it works for you too, I'll get it committed.
 
Thanks,
-- 
Alexander Kabaev

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (FreeBSD)

iD8DBQFNsOTwQ6z1jMm+XZYRAn7HAJ9jFl2fVg2PeEVNhFlwKc6CiWrilwCfX/x8
Ymf4nnVZXY3/k3ZpVsbue+A=
=J6jf
-----END PGP SIGNATURE-----

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