<html><head><base href="x-msg://2542/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On May 9, 2011, at 3:36 AM, Linh Ho Tran wrote:</div><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font-family: 'times new roman', 'new york', times, serif; font-size: 12pt; "><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; ">1. Compile to LLVM Bitcode</p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><i><span> llvm-gcc –emit-llvm foo.c –c –o foo.bc</span></i></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span>2. Insert Path Instruments</span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><i><span> opt –insert-path-profiling foo.bc –o foo_path.bc</span></i></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span>3. Link with profile runtime library and make machine code</span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><i><span> llvm-ld –lprofile_rt –native foo_path.bc –o foo_path</span></i></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span>4. Run program to get profile info</span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><i><span> ./foo_path –llvmprof-out</span></i></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span>5. Create path count map from raw data</span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><i><span> opt –path-profile-loader-file =llvmprof.out –path-profile-loader foo_path.bc –o path.out</span></i></p><p class="MsoNormal" style="margin-bottom: 0.0001pt; line-height: normal; "><span>6. Load Profile info: </span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><i><span> llvm-prof path.out</span></i></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><span>The error message from llvm-prof is: <span class="Apple-converted-space"> </span><span style="font-style: italic; font-weight: bold; ">llvm-prof: Unkknown packet #5</span></span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.3in; line-height: normal; "><span><br></span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.3in; line-height: normal; "><span>Could you explain me the error message?<span class="Apple-converted-space"> </span><br></span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><span>Are there errors in the command chain?</span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0.3in; line-height: normal; "><span>What is the format of file <span class="Apple-converted-space"> </span><span style="font-style: italic; font-weight: bold; ">llvmprof.out</span>? Is it possible to read llvmprof.out from command llvm-prof by ignoring step 5?</span></p><p class="MsoNormal" style="margin-top: 6.25pt; margin-right: 0in; margin-left: 0.3in; margin-bottom: 0.0001pt; line-height: normal; "><span>What is the purpose of command in step 5?<br></span></p></div></div></span></blockquote><br></div><div>Hi Linh,</div><div><br></div><div>We had considerable interest in path profiling several months ago, but it was purely an experimental feature and I'm not sure if anyone is committed to maintaining the code base. I'm copying some of the interested parties to find out the current level of interest and activity. If you find the time to fix any issues, please send a patch. If the code isn't being maintained it will eventually be pruned from the source tree.</div><div><br></div><div>-Andy</div><br></body></html>