public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* print_backtrace() problem
@ 2009-01-16  7:08 Peter Teoh
  2009-01-16  8:37 ` Mark Wielaard
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Teoh @ 2009-01-16  7:08 UTC (permalink / raw)
  To: SystemTAP

Why is it that when I call print_backtrace() inside stp script, it
only give me a short stacktrace:

====>ext2_readdir
 0xf7e1e97f : ext2_readdir+0x1/0x2d7 [ext2]

====>ext2_get_page
 0xf7e1e33d : ext2_get_page+0x1/0x22d [ext2]

<====ext2_get_page
Returning from: 0xf7e1e33c : ext2_get_page+0x0/0x22d [ext2]
Returning to  : 0xf7e1eae7 : ext2_readdir+0x169/0x2d7 [ext2]

whereas when I inserted a dump_stack() call inside my ext2_readdir() I
got a much longer stacktrace:

Jan 16 00:28:46 localhost kernel: Call Trace:
Jan 16 00:28:46 localhost kernel:  [<f8a2e9f2>] ext2_readdir+0x74/0x2ed [ext2]
Jan 16 00:28:46 localhost kernel:  [<c04a3748>] ? filldir64+0x0/0xd2
Jan 16 00:28:46 localhost kernel:  [<c04ab7e8>] ? mnt_drop_write+0x22/0xbd
Jan 16 00:28:46 localhost kernel:  [<c04a394f>] vfs_readdir+0x68/0x94
Jan 16 00:28:46 localhost kernel:  [<c04a3748>] ? filldir64+0x0/0xd2
Jan 16 00:28:47 localhost kernel:  [<c04a39de>] sys_getdents64+0x63/0xa4
Jan 16 00:28:47 localhost kernel:  [<c0403245>] sysenter_do_call+0x12/0x26

I suspect something wrong with the .config:

CONFIG_DEBUG_KERNEL=y
CONFIG_DEBUG_FS=y
CONFIG_DEBUG_INFO=y
CONFIG_FRAME_POINTER=y
CONFIG_KPROBES=y
CONFIG_HAVE_KPROBES=y
CONFIG_KRETPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_MARKERS=y
CONFIG_OPROFILE=m
CONFIG_HAVE_OPROFILE=y
CONFIG_RELAY=y
CONFIG_STACKTRACE_SUPPORT=y

Is that correct?

Thanks for the help.

-- 
Regards,
Peter Teoh

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: print_backtrace() problem
  2009-01-16  7:08 print_backtrace() problem Peter Teoh
@ 2009-01-16  8:37 ` Mark Wielaard
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2009-01-16  8:37 UTC (permalink / raw)
  To: Peter Teoh; +Cc: SystemTAP

Hi Peter,

On Fri, 2009-01-16 at 11:24 +0800, Peter Teoh wrote:
> Why is it that when I call print_backtrace() inside stp script, it
> only give me a short stacktrace:

Could you try your script with stap -DSTP_USE_DWARF_UNWINDER=1
This should give more accurate backtraces. We have contemplated enabling
it by default, but needed more testing. So if it helps you then that
would be a good data point for enabling it by default :)

But please also let us know if it doesn't help at all.
If it doesn't help could you also run with -DDEBUG_UNWIND=3 so we can
analyze why it doesn't help improve your backtraces?

Thanks,

Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-16  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-16  7:08 print_backtrace() problem Peter Teoh
2009-01-16  8:37 ` Mark Wielaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).