From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4381 invoked by alias); 30 Jun 2009 22:10:57 -0000 Received: (qmail 4373 invoked by uid 22791); 30 Jun 2009 22:10:56 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_83,J_CHICKENPOX_93,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e34.co.us.ibm.com (HELO e34.co.us.ibm.com) (32.97.110.152) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 30 Jun 2009 22:10:50 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e34.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n5UM7Vm0032194 for ; Tue, 30 Jun 2009 16:07:31 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n5UMAk3L214792 for ; Tue, 30 Jun 2009 16:10:46 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n5UMAjZe028276 for ; Tue, 30 Jun 2009 16:10:46 -0600 Received: from [9.47.18.94] (dyn9047018094.beaverton.ibm.com [9.47.18.94]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n5UMAiFj028220; Tue, 30 Jun 2009 16:10:44 -0600 Subject: Re: A question on PPC32 From: Jim Keniston To: ananth@in.ibm.com Cc: chen HJ , ashok.shanmugam@wipro.com, systemtap@sourceware.org In-Reply-To: <20090630091157.GA4930@in.ibm.com> References: <20090629095657.GB5396@in.ibm.com> <79E6823080C67C4780654AFA9678580203B6E175@BLR-SJP-MBX01.wipro.com> <20090629101804.GC5396@in.ibm.com> <20090630091157.GA4930@in.ibm.com> Content-Type: text/plain Date: Tue, 30 Jun 2009 22:10:00 -0000 Message-Id: <1246399734.5003.20.camel@dyn9047022112.beaverton.ibm.com> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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: 2009-q2/txt/msg01090.txt.bz2 On Tue, 2009-06-30 at 14:41 +0530, Ananth N Mavinakayanahalli wrote: > On Tue, Jun 30, 2009 at 08:11:29AM +0800, chen HJ wrote: > > Hi all, > > > > Thanks for your response, can you provide any more detailed steps > > about how to make systemTap work on PPC32? > > On first glance, additions/modifications would be required to > runtime/regs.c runtime/regs.h runtime/string.h runtime/copy.c > > Look for all instances of arch specific code in the above files and > you'll need to add or modify existing stubs for it to work on powerpc. > > Further, you'll need to build and run SystemTap to determine if any > other changes would be needed for ppc32 enablement. > > Ananth You'll probably need to add a "ppc" subdirectory* to the tapset directory, with registers.stp and syscalls.stp. (*I don't have a ppc32 box handy. I think that the subdirectory name is supposed to match whatever "uname -m" reports.) If you want to probe functions in user-space programs -- e.g., probe process("myprog").function("myfunc") { ... } you'll need to port uprobes. This probably means cloning and/or editing runtime/uprobes/uprobes_ppc64.{c,h}, and making the obvious changes to uprobes_arch.{c,h} in runtime/uprobes and runtime/uprobes2. In case it's not clear what the functions and macros in uprobes_ppc64.{c,h} are supposed to do, I can mail you the uprobes porting guide. Jim Keniston