This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: How to track the functions in self-written module using SystemTap?
- From: David Smith <dsmith at redhat dot com>
- To: Nan Xiao <xiaonan830818 at gmail dot com>, systemtap at sourceware dot org
- Date: Tue, 17 Nov 2015 10:48:12 -0600
- Subject: Re: How to track the functions in self-written module using SystemTap?
- Authentication-results: sourceware.org; auth=none
- References: <CA+MhoaPMSTgpHCDjNhwcDkMaLryLy+F6tH6HNcrvDDF9bEbBbg at mail dot gmail dot com>
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)