This is the mail archive of the systemtap@sourceware.org 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: Enabling dwarf unwinder for ppc64


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]


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