[LLVMdev] LLVM profiling

rantao at umd.edu rantao at umd.edu
Tue Nov 25 12:39:28 PST 2008


Hello,

My name is Rantao Chen and i am a student at the University of Maryland. I am 
currently doing some research for a professor to do Basic Block profiling using 
LLVM. I have set up the environment correctly and built the profile_rt.so shared 
library, but i am having some problems using the LLVM profiling tools. 

I run "opt -insert-function-profiling -insert-block-profiling input.bc -o 
output.bc" and an output file generates correctly.
I have disassembled the output file and i can see that profiling code has been 
added. 
I then run "llvm-prof -A output.bc -o llvmprof.out".
For some reason, nothing gets written to llvmprof.out; instead everything is 
written to the terminal window. At the very top, i get a message saying 
"function counts are not available" and every basic block has an execution count 
of 0.

Am i doing something wrong or am i missing an option flag somewhere? If 
anyone could offer any help or suggestions on why this is happening and/or 
how to get basic block profiling working, i would greatly appreciate it.

Thanks in advance.

-Rantao Chen



More information about the llvm-dev mailing list