[LLVMdev] Dynamic Profiling - Instrumentation basic query

Silky Arora silkyar at umich.edu
Sun Jan 13 22:47:07 PST 2013


Hi,

@Alastair: Thanks a bunch for explaining this so well. I was able to write
a simple profiler, and run it.

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.
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.

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.

@Criswell: Thank you so much for helping me with this.
I am starting to write my own code, but having a look at the existing code
would definitely help me.

Thanks and Regards,
Silky


On Mon, Jan 14, 2013 at 12:06 AM, Criswell, John T <criswell at illinois.edu>wrote:

> 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.
>
> -- John T.
>
> ________________________________________
> From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf
> of Silky Arora [silkyar at umich.edu]
> Sent: Saturday, January 12, 2013 10:28 PM
> To: llvmdev at cs.uiuc.edu
> Subject: [LLVMdev] Dynamic Profiling - Instrumentation basic query
>
> Hi,
>
> 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.
> From what I could pick up, edge-profiler.cpp increments a counter
> dynamically which is somehow dumped onto llvmprof.out by profile.pl
>
> 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?
>
> Thanks!
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20130114/4f8cdf8b/attachment.html>


More information about the llvm-dev mailing list