<div dir="ltr">Jon,<br>I need to create a database of basics blocks and their execution time. The only thing I'm concerned is if a block A is more expensive than a block B.<br>Do you think that even with the overhead I would be able to get the A > B information?<br>Like: overhead + time(A) > overhead + time(B) => A > B.<br>If so, I'm not too much concerned about the accuracy.<br><br>Not sure if I was clear,<br><br>Thanks again<br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><span style="color:rgb(102,102,102)">Vanderson M. Rosario</span><br></div></div>
<br><div class="gmail_quote">2014-09-17 17:26 GMT-03:00 Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I think if you do this, you're quickly going to realize that there's quite a lot of overhead in getting the time stamps needed to record basic block duration, so you're not going to get accurate results except for really big basic blocks.<br>
<br>
<br>
Cheers,<br>
<br>
Jon<div><div class="h5"><br>
<br>
On 9/17/14 1:53 PM, Vanderson Martins do Rosario wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
Guys,<br>
<br>
Someone have any idea how could I measure the execution time of each LLVM basic<br>
block of a program?<br>
<br>
I tried to use some profiling tools like gcov and perf, but as far as I know<br>
they can only give me the frequency that each basic block is executed.<br>
<br>
I was thinking about writing a pass to add PAPI instructions in each LLVM basic<br>
block. Do you think is a good idea?<br>
<br>
Thanks<br>
<br>
Vanderson M. Rosario<br>
<br>
<br></div></div>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
<br><span class="HOEnZb"><font color="#888888">
</font></span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Jon Roelofs<br>
<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a><br>
CodeSourcery / Mentor Embedded<br>
</font></span></blockquote></div><br></div>