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>
- Cc: "Frank Ch. Eigler" <fche at redhat dot com>, systemtap at sourceware dot org
- Date: Thu, 3 Dec 2015 11:03:54 -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> <564B5A4C dot 1080302 at redhat dot com> <CA+MhoaNG0hENo=cnOrxogX2qofdQodh-sY7mbKoZabn+L5GgFg at mail dot gmail dot com> <564CD3C1 dot 2090900 at redhat dot com> <CA+MhoaPxCC1_CH86A7SuXaoNEJyzaRvv2wpha8shF4V8T9WeOQ at mail dot gmail dot com> <CA+MhoaPGgWuVCEnW8p6cvbN_6qFE1jeDjz+pYtDuCbL00b5Ong at mail dot gmail dot com> <564DE376 dot 3020104 at redhat dot com> <CA+MhoaPCnkDp=A8KD19g1J+Gu91Z=+re09i8xgbg8=DW++uegQ at mail dot gmail dot com> <565CC50B dot 90104 at redhat dot com> <CA+MhoaPHi6ORfgTtWu_Z09zLAcgaAEPO10vWFi1kNhvsS5V0Ow at mail dot gmail dot com> <y0mk2oync6p dot fsf at fche dot csb> <CA+MhoaO9kbLCWJ4S3jSGxW2gr=TW8fGhZ8znG5pX5dXzLLoh6Q at mail dot gmail dot com> <565DCA83 dot 6040102 at redhat dot com> <CA+MhoaOc18xQ0aa4e7uiKwVy6oEwHs-1GuP3pPPLyNtXyQA2nQ at mail dot gmail dot com> <565F65D4 dot 4050005 at redhat dot com> <CA+MhoaOQEgOe_b-wdY-qbWPCgPdFdN2WkvMTU-L7c9W1bZs8pw at mail dot gmail dot com>
On 12/02/2015 07:13 PM, Nan Xiao wrote:
> Hi David,
>
> (1)
>>>> Hmm. OK, let's try a couple more things:
>>>
>>>> 1) It could be that systemtap is missing the module load somehow. So,
>>>> try this:
>>>
>>>> - load the module
>>>> - run stap
>>>> - exercise the module
>>>> - unload the module
>>>> - kill stap
>>>
>>> Still outputs nothing.
>
>> Can you do the same thing here and add '-DDEBUG_KPROBES' to the stap
>> command and show us the output?
>
> After adding '-DDEBUG_KPROBES', the stap command still outputs nothing.
Hmm.
> (2)
> [root@localhost testsuite]# make installcheck
> RUNTESTFLAGS="modules_out_of_tree.exp kmodule.exp"
>
>
> Running ./systemtap.base/kmodule.exp ...
>
> === systemtap Summary ===
>
> # of expected passes 7
Ah. It ran kmodule.exp, but not modules_out_of_tree.exp. You are running
systemtap 2.4, and that testcase was first present in systemtap 2.6.
I was testing another bug so I had a RHEL 7.0 systemtap set up and I
installed systemtap 2.4 on it. It looks like that version can't probe
out-of-tree modules.
It looks like you've got a couple of options:
1) Copy your module into the kernel module tree (located at
/lib/modules/`uname -r`/kernel) to use systemtap on it.
2) Upgrade systemtap to at least 2.6. (I ran systemtap 2.6 on a RHEL 7.1
system, and the modules_out_of_tree.exp test case passed there.)
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)