llvm profiling

I'd like to get some runtime profile data on my code using LLVM. The various -insert-X-profiling passes seem to add the profiling instrumentation to the code, but how do I actually generate profiling output?

It seems like utils/profile.pl can do this, but it uses profile_rt.so which doesn't exist. I can manually compile the runtime directory using make install-bytecode, but it doesn't generate the necessary file either. I'm wondering why the root makefile doesn't even compile the runtime directory to begin with. Is there another way to go about this?

I'm using llvm-2.3 and llvm-gcc-4.2.1.


No one has touched the profiling stuff for a few years (I think I was
the last one when I added the sampling infastructure). The profiling
generated by these passes is intended to be consumed by llvm passes
and used in optimizations, it is not gprof compatible profiling.

As for running it, you need the profiling libraries you found in the
runtime directory and to link those in. Beyond that, there is really
no profile data consumer in llvm (besides the block placement pass).