Backward compatibility for insn probe point

Maynard Johnson maynardj@us.ibm.com
Thu May 14 19:01:00 GMT 2009


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
> 



More information about the Systemtap mailing list