[LLVMdev] Measure execution time of each basic block
Jonathan Roelofs
jonathan at codesourcery.com
Wed Sep 17 13:26:50 PDT 2014
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.
Cheers,
Jon
On 9/17/14 1:53 PM, Vanderson Martins do Rosario wrote:
> Guys,
>
> Someone have any idea how could I measure the execution time of each LLVM basic
> block of a program?
>
> I tried to use some profiling tools like gcov and perf, but as far as I know
> they can only give me the frequency that each basic block is executed.
>
> I was thinking about writing a pass to add PAPI instructions in each LLVM basic
> block. Do you think is a good idea?
>
> Thanks
>
> Vanderson M. Rosario
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the llvm-dev
mailing list