This is the mail archive of the systemtap@sources.redhat.com 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: return probes and stack traces


The first argument to the handler is a kretprobe_instance, which has a
member called ret_addr.

    --rusty

>-----Original Message-----
>From: systemtap-owner@sources.redhat.com [mailto:systemtap-
>owner@sources.redhat.com] On Behalf Of Martin Hunt
>Sent: Tuesday, June 28, 2005 1:40 PM
>To: systemtap@sources.redhat.com
>Subject: return probes and stack traces
>
>Am I correct that there is no easy way to find the return address from
>within a return probe?
>
>Here's what happens right now for an entry and return probe placed
>in uptime_read_proc(). Both call _stp_ret_addr() and
_stp_stack_print().
>
>ENTRY
>return addr=ffffffff801a7cf6
> 0xffffffff801a99d6 : uptime_read_proc+0x1/0xb8
> 0xffffffff801a7cf6 : proc_file_read+0xe4/0x224
> 0xffffffff80174bcf : vfs_read+0xcf/0x104
> 0xffffffff80174e26 : sys_read+0x45/0x6e
> 0xffffffff80110056 : system_call+0x7e/0x83
>
>RETURN
>return addr=10037ffa280
> 0xffffffff801215a0 : kretprobe_trampoline+0x1/0x2
> 0xffffffff8012159f : kretprobe_trampoline+0x0/0x2
> 0xffffffff80174bcf : vfs_read+0xcf/0x104
> 0xffffffff80174e26 : sys_read+0x45/0x6e
> 0xffffffff80110056 : system_call+0x7e/0x83
>
>So the return address and the calling function in the stack trace are
>wrong. Reading the sources, I don't see an easy way to fix this. If
that
>is the case, I will just document it and not worry about it.
>
>Martin
>


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