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: Nan Xiao <xiaonan830818 at gmail dot com>
- To: David Smith <dsmith at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Thu, 19 Nov 2015 08:49:14 +0800
- 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>
Hi David,
Got it, thanks very much for your time and help!
Best Regards
Nan Xiao
On Thu, Nov 19, 2015 at 3:38 AM, David Smith <dsmith@redhat.com> wrote:
> On 11/17/2015 09:38 PM, Nan Xiao wrote:
>> Hi David,
>>
>> Yes, the "FULL_PATH_TO_KEX" works:
>>
>> ~/Downloads/kernel/105.ops # stap -l
>> 'module("/root/Downloads/kernel/105.ops/kex.ko").function("*")'
>> module("/root/Downloads/kernel/105.ops/kex.ko").function("_open@/root/Downloads/kernel/105.ops/kex.c:21")
>> module("/root/Downloads/kernel/105.ops/kex.ko").function("_read@/root/Downloads/kernel/105.ops/kex.c:45")
>> module("/root/Downloads/kernel/105.ops/kex.ko").function("_release@/root/Downloads/kernel/105.ops/kex.c:33")
>> module("/root/Downloads/kernel/105.ops/kex.ko").function("copy_to_user@/usr/src/linux-3.12.49-3/arch/x86/include/asm/uaccess_64.h:72")
>> module("/root/Downloads/kernel/105.ops/kex.ko").function("kex_cleanup@/root/Downloads/kernel/105.ops/kex.c:90")
>> module("/root/Downloads/kernel/105.ops/kex.ko").function("kex_init@/root/Downloads/kernel/105.ops/kex.c:61")
>>
>> But the "RELATIVE_PATH_TO_KEX" doesn't work:
>> ~/Downloads/kernel/105.ops # stap -l 'module("./kex.ko").function("*")'
>> ~/Downloads/kernel/105.ops #
>>
>> Is it the expected behavior of SystemTap? Thanks!
>
> Good question. You are correct, using relative paths doesn't seem to
> work. I've filed PR19265 on this issue.
>
> <https://sourceware.org/bugzilla/show_bug.cgi?id=19265>
>
> Feel free to add yourself to the CC list on that bug. If you have the
> time, also feel free to look into this more.
>
> --
> David Smith
> dsmith@redhat.com
> Red Hat
> http://www.redhat.com
> 256.217.0141 (direct)
> 256.837.0057 (fax)