11 December 2007

Profiling DRI drivers

I've been spending a lot of time profiling DRI drivers for Gallium 3D. I've tried gprof, valgrind, and finally oprofile. Oprofile seems the best in my opinion for this purpose. More details on the DRI Wiki.

I also wrote a script to generate a time-colored call graph from oprofile output, using graphviz. See an output example of profiling glxgears on Gallium 3D:

The hotter the colour of a function is, more time is spent on that function and its children.

2 comments:

SEJeff said...

Try sysprof, it will help you out a lot. It is surprising you haven't tried it out already.

José Fonseca said...

SEjeff,

Try sysprof, it will help you out a lot. It is surprising you haven't tried it out already.

I heard about sysprof, and I referred to it in the DRI wiki, but looking to its homepage I couldn't notice any outstanding feature compared from oprofile apart the GUI, and the oprofile modules already came bundled with the kernel, so I ended up starting with those within my easy reach.

But one thing I noticed with oprofile ever since I wrote this post, is that results (especially the call graph timings) are vary a lot with kernel and distribution. So in the next opportunity I do plan to try and see if sysprof produces more consistent results.

Thanks for your feedback.