Reputation: 90503
I have a medium sized application written in c++ using Qt. I wanted to profile things to see where my least performant code was so I compiled everything with -pg
.
However, my application makes use of a lot of plugins using the QTPlugin mechanism (boils down to a dlopen and a dlsym of a instance object per plugin). I've noticed that gprof doesn't seem to include functions from plugins.
Yes, the plugins are also compiled with -pg
and all that. Is there anything special I have to do get everything profiled? Or am I missing something simple?
Upvotes: 3
Views: 1502
Reputation: 6059
Valgrind(callgrind with kcachegrind as a viewer) is a good choice as strager said. You can also try using http://oprofile.sourceforge.net/
Upvotes: 2
Reputation: 90052
If you can use it, I think Valgrind's callgrind only needs debug symbols (-g) to profile code. I'm not sure if it works with dynamically linked objects, though.
Upvotes: 3