Best ways to analyze application performance?

Vladimir Vukicevic vladimirv at gmail.com
Sun Jul 17 20:11:01 PDT 2005


On 7/17/05, Clemens Eisserer <linuxhippy at gmail.com> wrote:
> Hello,
> 
> I would describe myself as a ui-performance fanatism and x11 newbie
> but everybody needs to get started with something sometimes ;-)
> 
> I am very interrested in helping some some open source UI toolkits and
> applications in tuning their interfaces  - however I come from the
> java-world where a profiler (thanks to the vm) was everything needed
> to see the problematic areas of an application.
> 
> Do special tools exist for measuring performance of x11 based
> applications? If not, which profiler would you recommend for tuning
> x11 based applications?

Profiling X-based apps is pretty tricky, because there are always at
least two separate processes involved -- the application itself, and
the X server.  Sometimes the communication overhead between the two
can be significant (e.g. passing lots and lots of image data back and
forth via XImage), and you start to notice the kernel taking up a
significant chunk of your profile data.

In general, though, you want a tool like oprofile, and an X server and
driver modules built with symbols, so you can see what's going on in
the server itself.  You may also want to run the app synchronously
(see XSynchronize()), which will in general kill overall performance
but will give you a better idea what code paths in your application
are triggering slow operations on the server side.  You may also find
it useful in some circumstances to trace the X protocol communications
between the app and the server.  'xrestop' can also be useful for
viewing server-side resource usage.

    - Vlad



More information about the xorg mailing list