This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: How to track the functions in self-written module using SystemTap?


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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]