How to Get Path Profile and Print it


I was trying to use utils/ script to get path profile and print it from a simple hello world program.

First I do the following -

Compile the hello.c into LLVM bitcode file using -

clang hello.c -S -emit-llvm -o hello.bc

But when I try to run the following script -

…/llvmclang/llvm-3.0.src/utils/ -edge hello.bc

I get the following error -

llvm-prof: hello.bc: Invalid bitcode signature

Also in the, an argument can be “function”. But when I try to run with the argument function, the output is -

opt: Unknown command line argument ‘-insert-function-profiling’. Try: ‘opt -help’

I was in the hope of getting path profiles with the -function argument. But is “insert-path-profiling” supported in llvm? I am asking this because I didn’t see any transformation for path-profiling in the website.

Thank you;