I am having some performance issues in X because of using 3 monitors and xinerama. I'd like to see if gcc's profile-directed optimization will improve performance. To do this, I need to know which library or libraries are responsible for most CPU usage. Does anybody know how to do this?
For example, top tells me that the process X is hogging the CPU, but I need to know which shared libraries are actually responsible for CPU usage (e.g. libXinerama or libX11, etc.) before I can try to optimize them.
Thanks!

