This is the mail archive of the
systemtap@sources.redhat.com
mailing list for the systemtap project.
return probes and stack traces
- From: Martin Hunt <hunt at redhat dot com>
- To: "systemtap at sources dot redhat dot com" <systemtap at sources dot redhat dot com>
- Date: Tue, 28 Jun 2005 13:40:14 -0700
- Subject: return probes and stack traces
- Organization: Red Hat Inc.
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