This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: script from chris mason


I forgot to mention that one way to capture more of the backtrace is to increase the maximum string size on the command line.

For example:

stap -DMAXSTRINGLEN=1024 io_submit.stp

This gives you 1024 bytes per array element to store backtraces instead of the default 128 bytes.

Mike

Mike Mason wrote:
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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]