public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Using systemtap to look at futexs
@ 2006-05-16 13:43 William Cohen
  0 siblings, 0 replies; 5+ messages in thread
From: William Cohen @ 2006-05-16 13:43 UTC (permalink / raw)
  To: SystemTAP; +Cc: Gavin Romig-Koch

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)
}

^ permalink raw reply	[flat|nested] 5+ messages in thread
* Re: Using systemtap to look at futexs
@ 2006-05-16 21:57 Frank Ch. Eigler
       [not found] ` <446A4D7F.5010706@am.sony.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Frank Ch. Eigler @ 2006-05-16 21:57 UTC (permalink / raw)
  To: systemtap

wcohen wrote:

> [...] 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)
> } [...]

Given the sheer number of such scripts that are almost the same, how
about working out a generalization?  How about a tapset that includes
a common trace function (unless the LKET scripts already include
this).  Or a shell script to generate the systemtap scripts?  Or
another command-line-argument substitution mechanism?

- FChE

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-05-16 23:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-16 13:43 Using systemtap to look at futexs William Cohen
2006-05-16 21:57 Frank Ch. Eigler
     [not found] ` <446A4D7F.5010706@am.sony.com>
     [not found]   ` <20060516222913.GH17707@redhat.com>
2006-05-16 22:40     ` Tim Bird
2006-05-16 23:16       ` Vara Prasad
2006-05-16 23:16       ` Hien Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).