From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19728 invoked by alias); 13 Oct 2011 22:21:22 -0000 Received: (qmail 19718 invoked by uid 22791); 13 Oct 2011 22:21:21 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 13 Oct 2011 22:20:57 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p9DMKuUW031079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 13 Oct 2011 18:20:56 -0400 Received: from springer.wildebeest.org (ovpn-116-25.ams2.redhat.com [10.36.116.25]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p9DMKtXs010420 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 13 Oct 2011 18:20:56 -0400 Received: by springer.wildebeest.org (Postfix, from userid 500) id BAD2C49C84; Fri, 14 Oct 2011 00:20:54 +0200 (CEST) Subject: Re: Enabling dwarf unwinder for ppc64 From: Mark Wielaard To: systemtap@sourceware.org In-Reply-To: <1317986514.3351.26.camel@springer.wildebeest.org> References: <1317986514.3351.26.camel@springer.wildebeest.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Date: Thu, 13 Oct 2011 22:21:00 -0000 Message-ID: <1318544454.17642.24.camel@springer.wildebeest.org> Mime-Version: 1.0 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org X-SW-Source: 2011-q4/txt/msg00057.txt.bz2 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 Date: Thu Oct 13 23:19:21 2011 +0200 Handle PPC64 function symbols by resolving function descriptors. =20=20=20=20 * 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() =3D=3D 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]