[LLVMdev] Path profiling command

Linh Ho Tran hotranlinh at yahoo.com
Mon May 9 03:36:05 PDT 2011


Hi  members,

I am a LLVM newbee. I am working in path profiling. I got an error message when 
reading the path profile data

I made a sample source named foo.c
The command chain to make llvm path profiling as follows:

1. Compile to LLVM Bitcode 
     llvm-gcc –emit-llvm foo.c –c –o foo.bc
2. Insert Path Instruments
     opt –insert-path-profiling foo.bc –o foo_path.bc 
3. Link with profile runtime library and make machine code
     llvm-ld –lprofile_rt –native foo_path.bc –o foo_path
4. Run program to get profile info
     ./foo_path –llvmprof-out
5. Create path count map from raw data
    opt –path-profile-loader-file =llvmprof.out –path-profile-loader foo_path.bc 
–o path.out 

6. Load Profile info: 
    llvm-prof path.out 
The error message from llvm-prof is:  llvm-prof: Unkknown packet #5

Could you explain me the error message? 

Are there errors in the command chain?
What is the format of file  llvmprof.out? Is it possible to read llvmprof.out 
from command llvm-prof by ignoring step 5?
What is the purpose of command in step 5?

 
Thanks so much
 
Linh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110509/0edb8a91/attachment.html>


More information about the llvm-dev mailing list