Dumping profile information at an arbitrary point in time


I have been able to successfully add a profiling pass to my PassManager. I
now want to dump this profile information arbitrary (like maybe after 1
second of running the program).

The problem is that the profile functions are in a separate library which is
loaded dynamically. I cannot call:


directly because of linker problems (EdgeProfAtExitHandler() is undefined at
compile time because it is in a shared library somewhere else). Is there a
way I can statically link the library to my program so I can call this dump
function at an arbitrary point in time?

Is there another way of doing what I am trying to do? Any help would be