Tuesday Jul 19, 2005

DDC Talk: "Peeking under the Hood"

I've just finished my tutorial presentation on tools for tracing X server/client interactions here at the Desktop Developer's Conference in Ottawa. I've posted both the slides from my talk and the DTrace probes and scripts I showed as one of the tools.

Unfortunately, I didn't get to cover all the tools I wanted to (mostly because I spent a lot more time in the last week on getting the Xorg 6.9 & 7.0 releases ready for their slightly delayed Release Candidate Zero milestones than on my presentation). There are some tools we've developed for our own use in the X group in Sun I was hoping to be able to release before the talk and cover, but didn't get around to - such as a tool that uses the X-Record extension to generate statistics on the number of times each request is called, which we used when switching from CDE to GNOME to determine which parts of the server needed more optimization attention now (Motif & GTK have very different call profiles - for instance, GTK is much more image/pixmap based than Motif was, while Motif use lots of filled rectangles and straight lines to draw it's window decorations and widgets).

About half the talk, and most of the interest though, was in the dtrace probes in the X server (which I wrote about in previous posts). A lot of what I showed was doable before, and in many cases, has been done before, but took much more work. For instance, the X Record program I wrote earlier, and an even older program that post-processed xscope output to produce call counts, both gave counts of the number of times a function was called, but they were a lot more work to write than the simple requests.d script. And that script was easily extended to time-requests.d to instead print the average CPU time the X server took to process each request.

Tip for giving presentations using StarOffice 7 in JDS 3 on Solaris 10: When you want to switch from slide show mode to another window to run a demo, exit slide show mode first in StarOffice, and then switch apps. Trying to Alt-Tab directly did amuse my audience (especially the author of an alternative window manager watching from his comfy spot on the couch), but discovering StarOffice/Metacity interaction bugs during a presentation to a less forgiving audience may not be the best demo of our "integrated" desktop. Fortunately, pkill soffice worked well in the terminal window I had switched to.

[Technorati Tags: , , , , ]

Tuesday Jul 12, 2005


BTW Donnie, it looks like you found an old version of xscope. A better source (the best public one I know of) is on Keith's CVS server under /cvs/xscope. It has added support for a number of extensions, including Render, RandR, MIT-SHM, and BigRequests. (Unfortunately, I haven't had a chance to bring these enhancements into the xscope we ship in Solaris yet.)

I also thought we released xscope patches as part of our X11/IPv6 source release from Sun to convert xscope to using Xtrans for connections so it can use transport types other than IPv4-only TCP sockets, such as IPv6, Unix domain sockets, or local pipes, but I can't find them online at the moment. Perhaps if we ask Keith nicely he'll import his xscope sources onto freedesktop.org so we can all contribute patches like that and autotool it. We've discussed before setting up a xorg/contrib area in the Xorg CVS tree on freedesktop.org for programs that need a home but which we don't intend to make part of the official full releases (similar to the old ftp.x.org contrib directory or GNOME's "Fifth Toe").

I might even be able to dig up the sources to the xplayback program we've had inside Sun for years to take raw output from xscope and replay it so that you can try to reproduce X bugs without needing the exact same software/environment as the person reporting a bug. It doesn't work in all cases, but has proved useful a few times.

[Technorati Tags: , , , ]


Engineer working on Oracle Solaris and with the X.Org open source community.


The views expressed on this blog are my own and do not necessarily reflect the views of Oracle, the X.Org Foundation, or anyone else.

See Also
Follow me on twitter


« February 2016