How to track the functions in self-written module using SystemTap?
David Smith
dsmith@redhat.com
Tue Nov 17 16:48:00 GMT 2015
On 11/17/2015 01:14 AM, Nan Xiao wrote:
> Hi all,
>
> I build a simple Linux module
> (https://github.com/troydhanson/kernel/blob/master/105.ops/kex.c),
> and want to use SystemTap to track it.
>
> But I find there is no available probes:
> # stap -l 'module("kex").function("*")'
> #
>
> How can I track the functions in module written by myself? Is there
> any tutorial about this? I try to
> search on https://sourceware.org/systemtap/documentation.html, but
> can't find wanted content.
If your 'kex' module isn't the same directory as the other kernel
modules (/lib/modules/`uname -r`/), systemtap won't be able to find it.
So, you have to tell systemtap where the module is, like this:
# stap -l 'module("FULL_PATH_TO_KEX").function("*")'
If that doesn't work, please let me know.
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
More information about the Systemtap
mailing list