Using gprof (wouldn't used one of the other better ones, but none would
build on Redhat 7.1 :( ) and Kprof, I did some analysis on the performance
profiling output.

A couple of places that optimization could help:

 _gfxr_auxbuf_spread    (754 calls @ 6.7ms/call)
gfx_xlate_pixmap        (283 calls @ 12.9ms/call)
_gfxwop_visual_draw     (1189 calls @ 2.8ms/call)


While investigating, I noticed that on gfx_resource.c around line 211
SIZETYPE, FUNCNAME,etc are defined and then re-defined around line 221.
Is this supposed to be happening? It looks like an ifdef/endif pair is
missing.


To reproduce my results, go get kprof (http://kprof.sourceforge.net, needs
KDE and qt installed). make and install kprof. Add -pg in the CFLAGS, and
rebuild freesci. run sciv, exercise the code a bit by playing the game
some. Exit sciv, find the "gmon.out" file (should be in CWD). Type "gprof
-b gmon.out > sciv.gprofile". Then run kprof and load sciv.gprofile.

Note that gprof doesn't profile outside of the main process/thread,
meaning the SDL sound server isn't looked at. there are other profilers
out there that Kprof recommends, but none of them would build on my Redhat
7.1 system. I would suggest trying those and seeing if the results are
better/more accurate.

Hope this helps,
good night!


--
http://www.clock.org/~matt


Reply via email to