This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: printing kernel backtrace
- From: Nikolay Borisov <n dot borisov at siteground dot com>
- To: "Frank Ch. Eigler" <fche at redhat dot com>
- Cc: systemtap at sourceware dot org
- Date: Sat, 12 Dec 2015 17:37:29 +0200
- Subject: Re: printing kernel backtrace
- Authentication-results: sourceware.org; auth=none
- References: <566C1400 dot 1060108 at siteground dot com> <y0mk2ojwx42 dot fsf at fche dot csb>
On Sat, Dec 12, 2015 at 4:38 PM, Frank Ch. Eigler <fche@redhat.com> wrote:
>
> Hi -
>
>
> n.borisov wrote:
>
>> I've started experimenting with systemtamp and I'd like to print the
>> callstack leading to the probed function.
>
> Welcome!
>
>> To that effect I have created the following very simple tapset:
>
> (Just a terminology nit: a "tapset" is a set of script fragments for
> automated reuse, kind of like libc. Yours is simply a script.)
>
>> probe module("dm_thin_pool").function("do_waker") {
>> print_syms(callers(-1))
>> printf("finished backtrace\n");
>> }
>
> print_backtrace() would have been equivalent.
>
>
>> However the output I get is something like that:
>>
>> 0xffffffffa0152c80 : do_waker+0x0/0x40 [dm_thin_pool]
>> 0xffffffff810a5025 : 0xffffffff810a5025
>> 0xffffffffa0152c80 : do_waker+0x0/0x40 [dm_thin_pool]
>> 0xffffffffa0152c80 : do_waker+0x0/0x40 [dm_thin_pool]
>> [...]
>> 0xffffffffa0152c80 : do_waker+0x0/0x40 [dm_thin_pool]
>> 0xffffffffa0152c8 : 0xffffffffa0152c8
>> finished backtrace
>
> That doesn't look quite right, does it. I'd expect stap to produce
> some messages about missing unwind/symbol information, but it's not
> happening right this time.
>
> The problem is probably that the unwind/symbol info for only your
> module was included. Try running your script again, but add
>
> -d kernel
So using -d kernel does indeed fix the backtrace. For the sake of completeness I
also tried using --ldd which according to the help should include debug info for
all referenced objects (including the kernel) but it doesn't work.
What am I missing?
>
> to the stap command line.
>
>
> - FChE