print_backtrace() only prints one line of the stack on x86_64. For example, the following stap script: probe kernel.function("schedule@kernel/sched.c") { print_backtrace(); } prints the following output: trace for 0 (swapper) 0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 [] trace for 24322 (sshd) 0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 [] trace for 0 (swapper) 0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 [] ... and so on The same script on i386 produces the following output: trace for 16419 (stpd) 0xc0294616 : schedule+0x2/0xc9a [] 0xf8d3e77d : sit_cleanup+0xc358e/0x0 [ipv6] 0xc0204955 : tty_write+0x1d3/0x1e4 [] 0xc013217b : autoremove_wake_function+0x0/0x2d [] 0xf8d3e6d7 : sit_cleanup+0xc34e8/0x0 [ipv6] 0xc015f001 : vfs_read+0xa8/0x14d [] 0xc015f456 : sys_read+0x3c/0x63 [] 0xc0103cab : sysenter_past_esp+0x54/0x79 [] trace for 3658 (sshd) 0xc0294616 : schedule+0x2/0xc9a [] 0xc0295a17 : schedule_timeout+0x13/0x8e [] 0xc0203d9f : tty_poll+0x53/0x60 [] 0xc016ebfd : do_select+0x352/0x3b8 [] 0xc016f12a : __pollwait+0x0/0x95 [] 0xc016eeb1 : core_sys_select+0x24e/0x26c [] 0xc016f488 : sys_select+0xd1/0x181 [] 0xc015f4b9 : sys_write+0x3c/0x63 [] 0xc0103cab : sysenter_past_esp+0x54/0x79 [] ... and so on. I tested using the CVS code as of 8/14/06.
Should be fixed in CVS head. Works for me now.
(In reply to comment #0) > trace for 0 (swapper) > 0xffffffff802cdcb5 : __sched_text_start+0x15/0xd32 [] The above line is very strange. It should be printing RIP and that should be in the schedule function, not _sched_text_start+0x15, which would be before where the kprobe was set. Could you verify where the kprobe is actually placed and check /proc/kallsyms to see if that is correct?
If this is still a problem, I need more information to reproduce it.
print_backtrace() is working now for me, too. This bug can be closed.
(In reply to comment #4) > print_backtrace() is working now for me, too. This bug can be closed. Closed.