Hi, I am using Path Profiling to path profile a C code. I'm using this commands:<div><br></div><div>$ llvm-gcc -c -emit-llvm file.c -o file.bc</div><div>$ opt --insert-hotpath-profiling file.bc -o file.ins.bc</div><div>
$ llc -march=x86 file.ins.bc -o file.ins.s</div><div>$ gcc -I llvm2.9/runtime/PathProfling.c -I llvm2.9/runtime/CommonProfiling.c</div><div>$ ./a.out</div><div><br></div><div>This will give me path profile of of program in 'llvmpro.out'</div>
<div><br></div><div>to decode this profile data I tried as:</div><div>$ llvm-prof -A file.ins.bc llvmprof.out </div><div> this gives error:</div><div>llvm-prof: Unknown packet type #5!</div><div><br></div><div>I also tried to decode the "llvmprof.out" manually and found that it dumps different profile data for different input files.</div>
<div><br></div><div>For example for bzip2.c is dumps like this:</div><div><div><br></div><div style="text-align:left"><i> Pty = 1</i></div><div style="text-align:left"><i> SavedArgslength=10</i></div><div style="text-align:left">
<i> SavedArgs=(null)</i></div></div><div style="text-align:left"><i> </i></div><div style="text-align:left"><i> 4*<unsigned> random data , that i cant figure out</i></div><div><div style="text-align:left"><i> </i></div>
<div style="text-align:left"><i> Profile Header: 5</i></div><div style="text-align:left"><i> functionCount = 47</i></div><div style="text-align:left"><i> Function Id = 4 NumPathsExecuted = 36</i></div></div><div style="text-align:left">
<i> path1 : count1</i></div><div style="text-align:left"><i> path2 : count2 and so on...</i></div><div style="text-align:left"><i><br></i></div><div style="text-align:left">But also this format is not same for all input file. For gzip.c and gcc.c it stores data in some different manner.</div>
<div style="text-align:left"><br></div><div style="text-align:left">I urgently need some suggestions and solutions about this problem.</div><div style="text-align:left"><br></div><div style="text-align:left">Thanks in advance </div>
<div style="text-align:left"><i><br></i></div><div style="text-align:left"><img src="http://www.itimes.com/files/blogfiles/523074/best%20regards.gif"></div><div><div>Gaurav Kumar<br></div>
</div>