Let's say I want to profile usage of a single library which is used in many apps in the system. I'm ok with only statistical profile, not an accurate one (but that one would be nice too).
What I do not want to do is to recompile every running program with profiling support. I'd like the profiling information to be dumped either periodically or on demand to some file. It would be really good if the stats were broken down using application names, or pids.
Is there any way to achieve that right now?
Example usage: profiling the glib library using the data from a running system.