public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* PThread profiling
@ 2009-02-23 20:18 Daniel Tralamazza
  2009-02-23 23:29 ` Josh Stone
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Tralamazza @ 2009-02-23 20:18 UTC (permalink / raw)
  To: systemtap

Hi,

  I am doing userland synchronization primitives analysis as part of
my research. For the past 2 months or so I've been bugging people over
IRC with user space questions and bugs (sorry mjw & fche) I guess it's
time to show something.
  Just for a bit of context: I first tried to use dynamic probes,
e.g.: 'process("/lib64/libpthread.so.0").function("__pthread_mutex_lock")
{}'. I even did a tapset for most pthread functions inside NPTL
('probe pthread.create'). It worked fine, but the overhead was causing
measurements errors (too slow == higher contention probability). It
was clear that I had to use static markers, all I had to do was patch
glibc/nptl and voila.
  Right now I have a simple systemtap provider and a small glibc patch
(both WIP). I will continue to update this work as part of my
research, at the same time I making it available to anyone interested.

For the lazy people (like me) I have built glibc rpms for fedora 10
x86_64, you can find them here
http://daniel.tralamazza.com/pub/rpms.tar.gz
For the rest of you (suicidal maniacs) wanting to compile your own
glibc, I've put together a glibc.spec + patches:
http://daniel.tralamazza.com/pub/glibc.spec
http://daniel.tralamazza.com/pub/glibc-usdt.patch
http://daniel.tralamazza.com/pub/glibc-usdt-20081113T2206.tar.bz2
http://daniel.tralamazza.com/pub/pthread_probe.d  (you need this if
you want to regenerate pthread_probe.h)

And there is even an example! Because everyone always shows lock
contention I chose something different.
The script can be found here:
http://daniel.tralamazza.com/pub/lock_topshared.stp
It shows the top 10 most shared locks, i.e.: locks which are accessed
by different threads and the sum of all acquisitions (per lock).

cheers,

-- 
Daniel Tralamazza
EPFL IC IIF DSLAB
INN-331

ps: The current patch doesn't contain the pthread_cond_* probes.

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

end of thread, other threads:[~2009-02-25 11:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-23 20:18 PThread profiling Daniel Tralamazza
2009-02-23 23:29 ` Josh Stone
2009-02-25  1:55   ` Daniel Tralamazza
2009-02-25  7:22   ` Frank Ch. Eigler
2009-02-25  8:01     ` Josh Stone
2009-02-25 12:52     ` Daniel Tralamazza
2009-02-25 21:31       ` Mark Wielaard

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