From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5471 invoked by alias); 14 May 2009 19:01:49 -0000 Received: (qmail 5108 invoked by uid 22791); 14 May 2009 19:01:48 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e32.co.us.ibm.com (HELO e32.co.us.ibm.com) (32.97.110.150) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 May 2009 19:01:43 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id n4EIwIFZ011119 for ; Thu, 14 May 2009 12:58:18 -0600 Received: from d03av01.boulder.ibm.com (d03av01.boulder.ibm.com [9.17.195.167]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v9.2) with ESMTP id n4EJ1bUl063146 for ; Thu, 14 May 2009 13:01:37 -0600 Received: from d03av01.boulder.ibm.com (loopback [127.0.0.1]) by d03av01.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id n4EJ1ark031844 for ; Thu, 14 May 2009 13:01:36 -0600 Received: from [127.0.0.1] (9-10-86-165.rchland.ibm.com [9.10.86.165]) by d03av01.boulder.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id n4EJ1ZLn031724; Thu, 14 May 2009 13:01:36 -0600 Message-ID: <4A0C6A90.6070306@us.ibm.com> Date: Thu, 14 May 2009 19:01:00 -0000 From: Maynard Johnson Reply-To: maynardj@us.ibm.com User-Agent: Thunderbird 2.0.0.21 (Windows/20090302) MIME-Version: 1.0 To: David Smith CC: Roland McGrath , systemtap@sourceware.org, "Frank Ch. Eigler" Subject: Re: Backward compatibility for insn probe point References: <49D3E3DF.1000108@us.ibm.com> <49F61D09.8090503@redhat.com> <49F8C1C0.8070208@us.ibm.com> <49F9E71D.2070500@redhat.com> <20090430203302.5FFA0FC3BF@magilla.sf.frob.com> <4A099E6B.8090501@redhat.com> <20090512181950.19BCCFC35D@magilla.sf.frob.com> <4A0AE179.9050801@redhat.com> <20090513182359.0CF33FC35D@magilla.sf.frob.com> <4A0C347D.9060204@redhat.com> In-Reply-To: <4A0C347D.9060204@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed 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/msg00588.txt.bz2 David Smith wrote: > Roland McGrath wrote: >>> I poked around the kernel source some more, but couldn't see what was >>> going wrong. >> I figured you'd use some stap probes to follow the code paths! > > Oh I did, but so much of it is inlined that it was incredibly difficult > to follow. > >>> I've changed the itrace code to stop the task after each step trap (so >>> that it acts more like ptrace). I've tested this on several kernels >>> (2.6.18-141.el5/ppc, 2.6.18-128.1.10.el5/x86_64/i686, and >>> 2.6.25-14.fc9.ppc64) and it seems to work correctly. David, thanks very much for doing this! I was pretty much at a loss on how to debug this. >>> >>> Does this seem like a reasonable work-around? Could there be problems >>> with this approach? >> I presume it kills performance. But what works works, that's a what a >> work-around is. I'd hope that you don't make it use this "not really >> right" mode for kernels with the modern utrace interface that doesn't have >> this bug. > > Yes, this is only for old utrace. As far as performance goes, I've > benchmarked single-stepping '/bin/ls' on x86_64 with both approaches. > Here's what I saw ('time' output, averages of 5 runs): > > - no stopping on each step trap: > real 0m3.735s > user 0m0.328s > sys 0m3.359s > > - stopping on each step trap: > real 0m4.101s > user 0m0.336s > sys 0m3.692s > > I could also limit this work-around to ppc-only, to not penalize other > architectures. > > One last thing. I thought I'd try block stepping, so I got access to an > ia64 machine. Unfortunately, using systemtap insn probes (either single > or block step) lock up the system with a spinlock lockup. Sigh. Does anyone know who maintains ia64/utrace? David, was the above error on "old" utrace or "new"? -Maynard >