public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Mark Wielaard <mjw@redhat.com>
To: systemtap@sourceware.org
Subject: Re: Enabling dwarf unwinder for ppc64
Date: Thu, 13 Oct 2011 22:21:00 -0000	[thread overview]
Message-ID: <1318544454.17642.24.camel@springer.wildebeest.org> (raw)
In-Reply-To: <1317986514.3351.26.camel@springer.wildebeest.org>

On Fri, 2011-10-07 at 13:21 +0200, Mark Wielaard wrote:
> It isn't perfect yet, but good enough to make all context.exp
> kernel/cross-module backtrace tests work. For kernel unwinding it seems
> good. For user space unwinding there are a couple of issues.
> Specifically symbol lookup seems broken. We discussed this some time ago
> on this list and this is what I am going to look into next, because that
> obscures all other issues (32-on-64 doesn't work and vma-vdso tests
> failing).

After some more cleanup and specifically:

commit a09fc5a45fef1aaf1fca5b02574c9d0e4890e96f
Author: Mark Wielaard <mjw@redhat.com>
Date:   Thu Oct 13 23:19:21 2011 +0200

Handle PPC64 function symbols by resolving function descriptors.
    
* translate.cxx (dump_symbol_table): If the module is EM_PPC64, but not
  ET_REL, then register two address for a STT_FUNC. The function descriptor
  address and the address of the function that the descriptor points to.
  For ET_REL still rely on the .function_name convention.

User space unwinding is looking good too. e.g. for getting a backtrace
of all locations in a user space program where a open syscall was made
on a file that failed:

$ stap --ldd -d /bin/cat -e 'probe syscall.open.return
  { if (pid() == target() && $return < 0)
    { log(user_string($filename)); print_ubacktrace(); } }' \
  -c '/bin/cat /foo/bar'

[Results below] As you can see not only does it show where the
file /foo/bar failed to open, but it also shows all the places (plus
backtrace) of the translation files it tries to open for printing "No
such file or directory".

If you have a ppc64 setup, please test it out and let me know of any
issues. The test results already look better, but there are still some,
like the big exelib.exp testcase that fail (I haven't fully figured out
why yet).

Thanks,

Mark

/bin/cat: /foo/bar: No such file or directory
Warning: child process exited with status 1
/foo/bar
 0x80eaf5b930 : __open_nocancel+0x8/0x98 [/lib64/power6/libc-2.12.so]
 0x10002128 : main+0x3a8/0xef0 [/bin/cat]
/usr/share/locale/en_US.utf8/LC_MESSAGES/libc.mo
 0x80eaf5b930 : __open_nocancel+0x8/0x98 [/lib64/power6/libc-2.12.so]
 0x80eae9f0b4 : _nl_load_domain+0x174/0x13b0 [/lib64/power6/libc-2.12.so]
 0x80eae9ef24 : _nl_find_domain+0x414/0x430 [/lib64/power6/libc-2.12.so]
 0x80eae9e3d4 : __dcigettext+0x3d4/0xa40 [/lib64/power6/libc-2.12.so]
 0x80eae9cc80 : dcgettext+0x20/0x40 [/lib64/power6/libc-2.12.so]
 0x80eaefa358 : strerror_r+0x68/0x194 [/lib64/power6/libc-2.12.so]
 0x80eaf6b598 : print_errno_message+0x18/0x50 [/lib64/power6/libc-2.12.so]
 0x80eaf6b7c4 : error_tail+0x1f4/0x2a0 [/lib64/power6/libc-2.12.so]
 0x80eaf6bb34 : error+0xa4/0x190 [/lib64/power6/libc-2.12.so]
 0x10002a6c : main+0xcec/0xef0 [/bin/cat]
/usr/share/locale/en_US/LC_MESSAGES/libc.mo
 0x80eaf5b930 : __open_nocancel+0x8/0x98 [/lib64/power6/libc-2.12.so]
 0x80eae9f0b4 : _nl_load_domain+0x174/0x13b0 [/lib64/power6/libc-2.12.so]
 0x80eae9ef00 : _nl_find_domain+0x3f0/0x430 [/lib64/power6/libc-2.12.so]
 0x80eae9e3d4 : __dcigettext+0x3d4/0xa40 [/lib64/power6/libc-2.12.so]
 0x80eae9cc80 : dcgettext+0x20/0x40 [/lib64/power6/libc-2.12.so]
 0x80eaefa358 : strerror_r+0x68/0x194 [/lib64/power6/libc-2.12.so]
 0x80eaf6b598 : print_errno_message+0x18/0x50 [/lib64/power6/libc-2.12.so]
 0x80eaf6b7c4 : error_tail+0x1f4/0x2a0 [/lib64/power6/libc-2.12.so]
 0x80eaf6bb34 : error+0xa4/0x190 [/lib64/power6/libc-2.12.so]
 0x10002a6c : main+0xcec/0xef0 [/bin/cat]
/usr/share/locale/en.utf8/LC_MESSAGES/libc.mo
 0x80eaf5b930 : __open_nocancel+0x8/0x98 [/lib64/power6/libc-2.12.so]
 0x80eae9f0b4 : _nl_load_domain+0x174/0x13b0 [/lib64/power6/libc-2.12.so]
 0x80eae9ef00 : _nl_find_domain+0x3f0/0x430 [/lib64/power6/libc-2.12.so]
 0x80eae9e3d4 : __dcigettext+0x3d4/0xa40 [/lib64/power6/libc-2.12.so]
 0x80eae9cc80 : dcgettext+0x20/0x40 [/lib64/power6/libc-2.12.so]
 0x80eaefa358 : strerror_r+0x68/0x194 [/lib64/power6/libc-2.12.so]
 0x80eaf6b598 : print_errno_message+0x18/0x50 [/lib64/power6/libc-2.12.so]
 0x80eaf6b7c4 : error_tail+0x1f4/0x2a0 [/lib64/power6/libc-2.12.so]
 0x80eaf6bb34 : error+0xa4/0x190 [/lib64/power6/libc-2.12.so]
 0x10002a6c : main+0xcec/0xef0 [/bin/cat]
/usr/share/locale/en/LC_MESSAGES/libc.mo
 0x80eaf5b930 : __open_nocancel+0x8/0x98 [/lib64/power6/libc-2.12.so]
 0x80eae9f0b4 : _nl_load_domain+0x174/0x13b0 [/lib64/power6/libc-2.12.so]
 0x80eae9ef00 : _nl_find_domain+0x3f0/0x430 [/lib64/power6/libc-2.12.so]
 0x80eae9e3d4 : __dcigettext+0x3d4/0xa40 [/lib64/power6/libc-2.12.so]
 0x80eae9cc80 : dcgettext+0x20/0x40 [/lib64/power6/libc-2.12.so]
 0x80eaefa358 : strerror_r+0x68/0x194 [/lib64/power6/libc-2.12.so]
 0x80eaf6b598 : print_errno_message+0x18/0x50 [/lib64/power6/libc-2.12.so]
 0x80eaf6b7c4 : error_tail+0x1f4/0x2a0 [/lib64/power6/libc-2.12.so]
 0x80eaf6bb34 : error+0xa4/0x190 [/lib64/power6/libc-2.12.so]
 0x10002a6c : main+0xcec/0xef0 [/bin/cat]

  reply	other threads:[~2011-10-13 22:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-07 11:22 Mark Wielaard
2011-10-13 22:21 ` Mark Wielaard [this message]
2011-10-20 14:37   ` Mark Wielaard
2011-10-20 18:51     ` Mark Wielaard
2011-10-21 13:35     ` Mark Wielaard
2011-10-21 13:54       ` Mark Wielaard
2011-10-21 15:02         ` Mark Wielaard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1318544454.17642.24.camel@springer.wildebeest.org \
    --to=mjw@redhat.com \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).