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?
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.
Valgrind(callgrind with kcachegrind as a viewer) is a good choice as strager said. You can also try using http://oprofile.sourceforge.net/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With