[LLVMdev] Edge Profiling

César divcesar at gmail.com
Thu Jan 31 03:46:26 PST 2013


Hi Roel, many thanks, it worked perfectly now!


César.

2013/1/31 Roel Jordans <r.jordans at tue.nl>:
> Hello,
>
> See answers below
>
>
> On 31/01/13 00:23, César wrote:
>>
>> Hello.
>>
>> I'm using these commands to compile the code below in order to collect
>> edge/blocks profiling:
>>
>> clang -emit-llvm -c sort.c -o sort.bc
>> opt -insert-edge-profiling sort.bc -o sort_prof.bc
>> clang sort_prof.bc -lprofile_rt -L/llvms/lib -o sort_prof
>>
>> then I run the program and display the profiling information using
>
>
> You can also skip the compilation step and run directly through the
> interpreter
>
> lli -load /llvms/lib/libprofile_rt.so sort_prof.bc
>
>
>> llvm-prof sort_prof.bc, and the result is:
>>
>
> try running llvm-prof on the original (non instrumented) code, that should
> give you the correct results
>
> llvm-prof sort.bc
>
> Cheers,
>  Roel
> _______________________________________________
> 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