I've got a C++ library that lets me write plugins in C++ and then automatically exposes them to python. I'm working on some networking stuff in a plugin and I'd like to profile it with something like gprof, but simply compiling with -pg and running the plugin via python doesn't generated the necessary profiling data. Unfortunately the plugins are tightly coupled so it's not possible to run them as standalone programs. Does anyone know of ways to profile shared libraries and/or plugins independently of the program running them?
+1
A:
I've found valgrind's cachegrind with KCachegrind to be helpful in analysis of un-prepared (e.g. no gprof code embedded) binaries.
msw
2010-03-23 17:59:55
That seems like it'll work quite nicely with my shared library stuff.
gct
2010-03-23 18:24:58