Hi there, I''ve been using OpenSolaris for three months now, and I''ve started to get interested about to get my hands dirty with DTrace. Since I have an strong GNOME background, I would like to use it to help GNOME developers to find performance problems. Federico Mena Quintero, one of the Novell GNOME guys is one of the people that are working on GNOME performance stuff. He posted this request on his blog asking opensolaris people to provide information about ipc during the GNOME startup: http://primates.ximian.com/~federico/news-2007-04.html#dtrace-help-for-ipc I''ve tried to learn DTrace to provide such help, but its like trying to drink the whole sea at once for me since I''m not used at all to lots of things at this level (ipc syscalls etc), I mean, I know what they are, I know what they do, but I don''t know what should I look for to learn how to solve it. I would appreciate any kind of script examples that help me to understand what I need to create the proper scripts to provide federico what is he asking for. Thanks in advance, -- Un saludo, Alberto Ruiz -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070706/f393613d/attachment.html>
Alberto Ruiz wrote:> I would appreciate any kind of script examples that help me to > understand what I need to create the proper scripts to provide federico > what is he asking for.I''d start with something like this: syscall::poll:entry { self->poll_ts = timestamp; } syscall::poll:return /self->poll_ts/ { self->poll_duration = timestamp - self->poll_ts; self->poll_ts = 0; } to get useful information, you need to - check for the process(es) of interest (either use pid$target somewhere and set something you can use in a predicate, or use /execname == "..."/ ... - actually do something useful with self->poll_duration - some aggregation (quantize) comes to mind, but I haven''t played^Wexperimented with anything but sum enough to give any useful advice. you''ll also see that while poll is a system call, select isn''t, so the syscall provider doesn''t know about it. You''ll have to do something like pid$target:libc:select:entry (don''t nail me down on the exact syntax!) for that. the pid provider can not "watch" more than one process at a time (that I know of), so if you don''t know which proc you''re looking for yet, this may involve some source-code perusal on your part to see which syscalls are involved to uniquely map this back to the select library call. I also invite you to go to opensolaris.org and have a look at the DTrace community page http://www.opensolaris.org/os/community/dtrace/, where there''s lots of examples to be found. I hope this helps Michael -- Michael Schuster Recursion, n.: see ''Recursion''
2007/7/6, Michael Schuster <Michael.Schuster at sun.com>:> > Alberto Ruiz wrote: > > I also invite you to go to opensolaris.org and have a look at the DTrace > community page http://www.opensolaris.org/os/community/dtrace/, where > there''s lots of examples to be found.Thanks a lot! I will give it a try as soon as a find some free time and I''ll let you know how far can I go. I hope this helps> Michael > -- > Michael Schuster > Recursion, n.: see ''Recursion'' >-- Un saludo, Alberto Ruiz -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.opensolaris.org/pipermail/dtrace-discuss/attachments/20070706/3c7f47ca/attachment.html>