[LLVMdev] counting branch frequencies
Sean Silva
silvas at purdue.edu
Wed Sep 19 06:45:20 PDT 2012
Hi, sorry for the late reply.
You may be interested in a particular feature of Intel CPU's called
Branch Trace Store, which causes the CPU to trace branches that it
takes (and optionally filter them according to various criteria). It
is documented in Intel's manuals (Volume 3 IIRC)). One example of what
you can do with this is that you can have it log taken branches into a
buffer and then trigger an interrupt when the buffer is full; a
handler in the kernel can then aggregate the branches and pass that
information down to userland for consumption.
--Sean Silva
On Fri, Sep 7, 2012 at 10:46 AM, Apala Guha <aguha at uchicago.edu> wrote:
> Hi,
>
>
>
> Is there a way to count branch frequencies using LLVM infrastructure?
>
>
>
> Thanks.
>
> -Apala
>
>
>
> Postdoctoral Scholar
>
> Department of Computer Science, University of Chicago
>
> Computation Institute, Argonne National Laboratory
>
> http://sites.google.com/site/apalaguha/home/
>
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
More information about the llvm-dev
mailing list