This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: backtrace and self-compiled module
Hi Christian,
On Thu, 2009-06-04 at 10:01 +0200, Christian Kaiser wrote:
> Thanks for your effort but that doesn't solve my problem. It is still
> two correct lines only...
>
> I'll try to give some more detail of what the backtrace should look like.
>
> [root@sunf-1 ~]# stap -d kernel -v stack_trace.stp dis_ssocks
> AF_SCI_stream_trigger_setup
> [...]
> ===== (1) =====
> 0xffffffff8850894a : AF_SCI_stream_trigger_setup+0x1/0x74 [dis_ssocks]
> 0xffffffff884ff04e : AF_SCI_init_sciconn+0x186/0x1b3 [dis_ssocks]
> 0x00ffffffff884ff0 : _osif_sock_cb_state_change+0xffffffff884ff0/0x0
> [dis_ssocks]
> 0x6800ffffffff884f : _osif_sock_cb_state_change+0x6800ffffffff884f/0x0
> [dis_ssocks]
> 0xf16800ffffffff88 : _osif_sock_cb_state_change+0xf16800ffffffff88/0x0
> [dis_ssocks]
> [...]
>
> should look like:
>
> AF_SCI_stream_trigger_setup [dis_ssocks/intr.c]
> AF_SCI_init_sciconn [dis_ssocks/stream.c]
> stream_start_connecter [dis_ssocks/connect.c, defined as static]
> AF_SCI_stream_connect [dis_ssocks/connect.c]
> [...]
>
> I find all symbols except the one for stream_start_connecter (OK since
> it is defined as static) in the dis_ssocks.ko file.
>
> 0000000000013949 T AF_SCI_stream_trigger_setup
> 0000000000009ec8 T AF_SCI_init_sciconn
> 000000000000ef70 T AF_SCI_stream_connect
It might just be that the backtracer gets confused somehow. Only now did
I notice you are using systemtap 0.7.2. Which is fairly old. The whole
backtrace mechanism was rewired for 0.9.7. The old one kind of just
"guessed" the addresses on the stack. The new one uses the dwarf
debug_frame tables to do exact unwinding.
If possible please do upgrade.
You can also try to get a bit more debugging output for stap itself by
running with -DDEBUG_SYMBOLS=1 and/or -DDEBUG_UNWIND=1 (use higher
values to get more output) to see what stap is trying to do.
Cheers,
Mark