script from chris mason

Mike Mason mmlnx@us.ibm.com
Wed Oct 17 15:27:00 GMT 2007


Hi Wenji,

Thanks for sending this to the mailing list.  This is exactly what we want to encourage.  

I reviewed the script and made several changes:

- Uses system call tapset for io_submit probes.
- Uses tid() instead of pid().  That's the correct way to associate events within a thread.
- Removed separate variables for array indexes. They're unnecessary in this case.
- Uses the array membership check feature in the schedule probe.
- Uses the '-' operator on the traces array in the end probe.  Eliminates the need to presort the array.

I confirmed that the script with my changes would build and run, but was unable to trigger the conditions that cause backtraces to be collected.  Can you or Chris test this in your environment?

Once the script is finalized, it would be great to document it in the War Stories section of the wiki.  We could also include it in Scripts & Tool on the wiki and the examples directory in cvs if we think it is of general interest.

Thanks,
Mike


Wenji Huang wrote:
> Hi,
> 
> This is the script from Chris Mason <chris.mason@oracle.com>. It could 
> find the most common causes of schedule during the AIO io_submit call. I 
> think it's very good that a kernel developer can use systemtap and share 
> his script.
> 
> Please review it and where it is putted?   how about in examples?
> 
> Thanks,
> Wenji
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: io_submit.stp
URL: <http://sourceware.org/pipermail/systemtap/attachments/20071017/fff17fb8/attachment.ksh>


More information about the Systemtap mailing list