[LLVMdev] LLVM profiling
andrewl at lenharth.org
Wed Nov 26 08:04:20 PST 2008
On Wed, Nov 26, 2008 at 4:26 AM, Nico <listiges at arcor.de> wrote:
> 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.
I don't know about now, but it use to be possible.
> On Nov 25, 2008, at 9:39 PM, <rantao at umd.edu> <rantao at umd.edu> wrote:
>> 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
>> 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
>> "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?
>> anyone could offer any help or suggestions on why this is happening
>> how to get basic block profiling working, i would greatly appreciate
>> Thanks in advance.
>> -Rantao Chen
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev