I have several large code bases which compile into dynamic libraries. I know that some of these have some very expensive dynamic global dynamic initializers. (That is, global instances of classes/structs which are very expensive to construct.)
I would like a way to view a list of what/where these dynamic initializers are in the code so I can see if they are expensive and need to be refactored. I'd like to avoid digging through a lot of assembly as some of these libraries are quite large and probably contain hundreds of dynamic initializers (many of them small and fairly cheap, like string construction).
Is there a tool that can help me with this? (My tool chain is Redhat Linux/gcc/cmake.)