Gaurav Kumar
2012-May-22 00:37 UTC
[LLVMdev] unable to decode llvmpro.out for path profiling
Hi, I am using Path Profiling to path profile a C code. I'm using this commands: $ llvm-gcc -c -emit-llvm file.c -o file.bc $ opt --insert-hotpath-profiling file.bc -o file.ins.bc $ llc -march=x86 file.ins.bc -o file.ins.s $ gcc -I llvm2.9/runtime/PathProfling.c -I llvm2.9/runtime/CommonProfiling.c $ ./a.out This will give me path profile of of program in 'llvmpro.out' to decode this profile data I tried as: $ llvm-prof -A file.ins.bc llvmprof.out this gives error: llvm-prof: Unknown packet type #5! I also tried to decode the "llvmprof.out" manually and found that it dumps different profile data for different input files. For example for bzip2.c is dumps like this: * Pty = 1* * SavedArgslength=10* * SavedArgs=(null)* * * * 4*<unsigned> random data , that i cant figure out* * * * Profile Header: 5* * functionCount = 47* * Function Id = 4 NumPathsExecuted = 36* * path1 : count1* * path2 : count2 and so on...* * * But also this format is not same for all input file. For gzip.c and gcc.c it stores data in some different manner. I urgently need some suggestions and solutions about this problem. Thanks in advance * * Gaurav Kumar -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120522/f58f1d8a/attachment.html>
Alastair Murray
2012-May-22 03:54 UTC
[LLVMdev] unable to decode llvmpro.out for path profiling
Hi Guarav, On 22/05/12 09:37, Gaurav Kumar wrote:> to decode this profile data I tried as: > $ llvm-prof -A file.ins.bc llvmprof.out > this gives error: > llvm-prof: Unknown packet type #5!As far as I'm aware the llvm-prof tool does not support path profiling data. I am working on a Google "Summer of Code" project to improve support for profile guided optimisation (including path profiling). I intend to fix this issue, but it is at the end of a long list of things to work on. Regards, Alastair.