From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3630 invoked by alias); 12 Aug 2013 08:58:09 -0000 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 Received: (qmail 3617 invoked by uid 89); 12 Aug 2013 08:58:08 -0000 X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 Received: from mail-de.keymile.com (HELO mail-de.keymile.com) (195.8.104.250) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Mon, 12 Aug 2013 08:58:07 +0000 Received: from frodo.de.keymile.net ([10.9.1.54]:33118 helo=mailrelay.de.keymile.net) by mail-de.keymile.com with esmtp (Exim 4.76) (envelope-from ) id 1V8nww-0007dy-15; Mon, 12 Aug 2013 10:58:02 +0200 Received: from srvdehan1003.de.keymile.net (srvdehan1003.de.keymile.net [10.9.1.108]) by mailrelay.de.keymile.net (8.12.2/8.12.2) with ESMTP id r7C8tlnV001607; Mon, 12 Aug 2013 10:55:48 +0200 (MEST) Received: from pc005093.de.keymile.net.de.keymile.net ([172.30.2.67]) by srvdehan1003.de.keymile.net with Microsoft SMTPSVC(6.0.3790.3959); Mon, 12 Aug 2013 10:58:01 +0200 Message-ID: <5208A399.9040006@keymile.com> Date: Mon, 12 Aug 2013 08:58:00 -0000 From: Holger Brunck User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130807 Thunderbird/17.0.8 MIME-Version: 1.0 To: Lukas Berk CC: Mark Wielaard , systemtap@sourceware.org Subject: Re: print_ubacktrace() and ppc 32 References: <51BF1C1E.7020208@keymile.com> <1371491014.4501.97.camel@bordewijk.wildebeest.org> <20130617180008.GC2219@redhat.com> <1371492348.4501.106.camel@bordewijk.wildebeest.org> <51C005AA.8010300@keymile.com> <20130803011202.GA1956@redhat.com> <51FF6667.1090404@keymile.com> <20130806190715.GA3387@redhat.com> <5201F432.3000800@keymile.com> <20130809152046.GD2101@redhat.com> In-Reply-To: <20130809152046.GD2101@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SW-Source: 2013-q3/txt/msg00118.txt.bz2 Hi, [..] On 08/09/2013 05:20 PM, Lukas Berk wrote: > > Ouch, would you mind running a simple hello world style probe? Along the > lines of 'probe process.function("main") {log("Hello")}' and seeing if > that runs properly? > sorry there was something wrong in my last setup and I was unable to reproduce this crash. Therefore I decided to rebuild a setup which is 100% reproducible. My previous test was made with our internal kernel branch which has some changes to the mainline kernel. So I took kernel 3.10.0. Compared to the original kernel I only added the needed config options to mgcoge_defconfig for uprobe support (relay, kprobes, module support...). I recompiled the systemtap host binaries with the latest snapshot: systemtap-20130810.tar.bz2 I did three changes compared to the original code to get the test for the powerpc backtrace support compilable: diff --git a/share/systemtap/runtime/linux/runtime.h b/share/systemtap/runtime/linux/runtime.h --- a/share/systemtap/runtime/linux/runtime.h +++ b/share/systemtap/runtime/linux/runtime.h @@ -134,7 +134,7 @@ static struct Only define STP_USE_DWARF_UNWINDER when STP_NEED_UNWIND_DATA, as set through a pragma:unwind in one of the [u]context-unwind.stp functions. */ -#if (defined(__arm__) || defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)) || defined (__s390x__) +#if (defined(__arm__) || defined(__i386__) || defined(__x86_64__) || defined(__powerpc64__)) || defined (__s390x__) || (__powerpc__) #ifdef STP_NEED_UNWIND_DATA #ifndef STP_USE_DWARF_UNWINDER #define STP_USE_DWARF_UNWINDER diff --git a/share/systemtap/runtime/unwind/ppc64.h b/share/systemtap/runtime/unwind/ppc64.h --- a/share/systemtap/runtime/unwind/ppc64.h +++ b/share/systemtap/runtime/unwind/ppc64.h @@ -54,7 +54,7 @@ PTREGS_INFO(gpr[29]), \ PTREGS_INFO(gpr[30]), \ PTREGS_INFO(gpr[31]), \ - PTREGS_INFO(softe), \ + PTREGS_INFO(mq), \ PTREGS_INFO(ctr), \ PTREGS_INFO(link), \ PTREGS_INFO(nip) diff --git a/share/systemtap/runtime/unwind/unwind.h b/share/systemtap/runtime/unwind/unwind.h --- a/share/systemtap/runtime/unwind/unwind.h +++ b/share/systemtap/runtime/unwind/unwind.h @@ -25,6 +25,8 @@ struct unwind_frame_info #include "i386.h" #elif defined (__powerpc64__) #include "ppc64.h" +#elif defined (__powerpc__) +#include "ppc64.h" #elif defined (__s390x__) #include "s390x.h" #elif defined (__arm__) A simple hello_world works fine. Then I compiled my stapprobe with ubacktrace: systemtap-2.4-32473/bin/stap -DDEBUG_UNWIND=99 -g -a powerpc -B CROSS_COMPILE=powerpc- script.stp and let it run on the target. The output is: WARNING: unwind Bad num=67108864 end-ptr=32 2*tableSize=8 _stp_stack_unwind_one_user:460: STARTING user unwind 0x10000448 : foo+0x1c/0x7c [/usr/local/bin/main] _stp_stack_unwind_one_user:476: CONTINUING user unwind to depth 1 unwind:1612: pc=10000448, 10000448 unwind:1652: trying debug_frame set_no_state_rule:398: reg=23, where=1 _stp_search_unwind_hdr:915: binary search for 10000448 unwind_frame:1331: /usr/local/bin/main: fde=0 unwind_frame:1399: cie=0 fde=0 startLoc=0 endLoc=0, pc=10000448 unwind:1656: debug_frame failed: -5, trying eh_frame set_no_state_rule:398: reg=23, where=1 _stp_search_unwind_hdr:915: binary search for 10000448 adjustStartLoc:866: adjustStartLoc=100002e0, ptrType=DW_EH_PE_datarel_sdata4, m=/usr/local/bin/main, s=.absolute eh=1 adjustStartLoc:874: eh_frame=ca54fd50, eh_frame_addr=10000668 adjustStartLoc:866: adjustStartLoc=100002e0, ptrType=DW_EH_PE_datarel_sdata4, m=/usr/local/bin/main, s=.absolute eh=1 adjustStartLoc:874: eh_frame=ca54fd50, eh_frame_addr=10000668 _stp_search_unwind_hdr:980: fde off=1000067c _stp_search_unwind_hdr:990: returning fde=ca54fd64 startLoc=100002e0 unwind_frame:1331: /usr/local/bin/main: fde=ca54fd64 unwind_frame:1336: /usr/local/bin/main: cie=ca54fd50 parse_fde_cie:291: codeAlign=4, dataAlign=fffffffc parse_fde_cie:305: map retAddrReg value 65 to reg_info idx 34 parse_fde_cie:369: startLoc: ca54f9c8, locrange: 24 adjustStartLoc:866: adjustStartLoc=ca54f9c8, ptrType=DW_EH_PE_pcrel_sdata4, m=/usr/local/bin/main, s=.absolute eh=1 adjustStartLoc:874: eh_frame=ca54fd50, eh_frame_addr=10000668 unwind_frame:1351: startLoc: 100002e0, endLoc: 10000304 unwind_frame:1353: pc (10000448) > endLoc(10000304) unwind:1664: unwinding failed: 1 Best regards Holger