[LLVMdev] LLVM profiling
Nico
listiges at arcor.de
Wed Nov 26 02:26:31 PST 2008
Hi Rantao,
perhaps you should use $llvmpath/utils/profile.pl for profiling? It
works well. If you don't want to use it, there is at least some code
in the script that should help you.
BTW: I'm not sure if it is possible to instrument the bitcode with
function and basic block code at the same time.
But it should work sequential (data in llvmprof.out are accumulated
after each run - not deleted)
Ciao,
Nico
On Nov 25, 2008, at 9:39 PM, <rantao at umd.edu> <rantao at umd.edu> wrote:
> 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
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list