Using Valgrind for performance profiling

Andreas Mützel andreas.muetzel at gmx.net
Sat Oct 25 16:22:38 CEST 2008


2008-10-22 Mark Kretschmann:
> For instance it could be interesting to see where we spend most of the
> time during startup and shutdown.

I just finished a few tests, i didn't notice any real problem. I profiled 3 
situations (startup, normal playback, shutdown), these are the results:

startup: 
- about 60% of the time is spent in QLibraryPrivate::isPlugin, which seems to 
be indirectly called by the qtscript engine on startup 
(AmarokScript::ScriptImporter::loadQtBinding calls 
QScriptEngine::importExtension which then cally some qt internal stuff which 
calls QLibraryPrivate::isPlugin)
- the rest seems ok

normal playback: 
- nothing to see here, almost all time is spent in phonon (as expected)

shutdown:
- no problems, most of the time is spent in destructors or in free(), i can't 
see any expensive operations going on. 

If you want to have a look at the callgraphs etc.: I'm oploading the callgrind 
output of the startup and shutdown right now, you'll be able to find them 
here:
http://www.uni-koblenz.de/~amuetzel/callgrind.out.startup
http://www.uni-koblenz.de/~amuetzel/callgrind.out.shutdown
(You'll need kcachegrind to view them.)

As I couldn't find any important performance issues, I'll do some checks for 
memory leaks with valgrind. 


More information about the Amarok-devel mailing list