This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Using systemtap to look at futexs
- From: William Cohen <wcohen at redhat dot com>
- To: SystemTAP <systemtap at sources dot redhat dot com>
- Cc: Gavin Romig-Koch <gavin at redhat dot com>
- Date: Tue, 16 May 2006 09:42:58 -0400
- Subject: Using systemtap to look at futexs
Monday I went to lunch with Gavin Romig-Koch. Gavin works in Red Hat
support. While we were talking he mentioned trying to solve a customer
problem that appeared to be caused by futex. An attempt was made to use
GDB to track futex operations from userspace. However, that really
slowed down the machine and never got the to reported problem. Gavin
thought that SystemTap might be useful in diagnosing this problem. This
morning I wrote a quick script to print out futex information while the
system is running. I don't know whether this would identify the specific
problem Gavin mentioned.
-Will
# futex.stp
#
# track which things are using futex
probe syscall.futex
{
printf("pid=%d exec=%s sys_futex(%s)\n", pid(), execname(), argstr)
}
probe syscall.futex.return
{
printf("pid=%d exec=%s sys_futex()=%s\n", pid(), execname(), retstr)
}