<div dir="ltr">Hi,<div><br></div><div style>@Alastair: Thanks a bunch for explaining this so well. I was able to write a simple profiler, and run it.</div><div style><br></div><div style>I need to profile the code for branches (branch mis predicts simulation), load/store instructions (for cache hits/miss rate), and a couple of other things and therefore, would need to instrument the code. </div>

<div style>However, I would like to know if writing the output to a file would increase the execution time, or is it the profiling itself? I can probably use a data structure to store the output instead. <br><br>Also, I have heard of Intel's Pin tool which can provide memory trace information. Could you please explain to me what you meant by hardware counters for dcache miss/hit rates. </div>

<div style><br>@Criswell: Thank you so much for helping me with this. <br>I am starting to write my own code, but having a look at the existing code would definitely help me.</div><div style><br></div><div style>Thanks and Regards,</div>

<div style>Silky</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Jan 14, 2013 at 12:06 AM, Criswell, John T <span dir="ltr"><<a href="mailto:criswell@illinois.edu" target="_blank">criswell@illinois.edu</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There is code that does this for older versions of LLVM.  I believe it is in the giri project in the LLVM SVN repository.  I can look into more details when I get back from vacation. Swarup may also be able to provide information on the giri code.<br>


<br>
-- John T.<br>
<br>
________________________________________<br>
From: <a href="mailto:llvmdev-bounces@cs.uiuc.edu">llvmdev-bounces@cs.uiuc.edu</a> [<a href="mailto:llvmdev-bounces@cs.uiuc.edu">llvmdev-bounces@cs.uiuc.edu</a>] on behalf of Silky Arora [<a href="mailto:silkyar@umich.edu">silkyar@umich.edu</a>]<br>


Sent: Saturday, January 12, 2013 10:28 PM<br>
To: <a href="mailto:llvmdev@cs.uiuc.edu">llvmdev@cs.uiuc.edu</a><br>
Subject: [LLVMdev] Dynamic Profiling - Instrumentation basic query<br>
<div><div class="h5"><br>
Hi,<br>
<br>
I am new to LLVM, and would like to write a dynamic profiler, say which prints out the load address of all the load instructions encountered in a program.<br>
>From what I could pick up, edge-profiler.cpp increments a counter dynamically which is somehow dumped onto llvmprof.out by <a href="http://profile.pl" target="_blank">profile.pl</a><br>
<br>
Could anyone explain me how this works? Can I instrument the code to dump out the load addresses or other such information to a file?<br>
<br>
Thanks!<br>
<br>
<br>
<br>
</div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">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/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>