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?


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)


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