Cesar
1
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
llvm-prof sort_prof.bc, and the result is:
Hello,
See answers below
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
Cesar
3
Hi Roel, many thanks, it worked perfectly now!
César.