[LLVMdev] LLVM instrumentation

David Siegel david.siegel at artcom.de
Fri Jul 17 07:56:24 PDT 2015


> On 17.07.2015, at 16:31, Wehrli Johan <johan.wehrli at heig-vd.ch> wrote:

[…]

> My goal with the instrumentation is, once I have the information (time + call), to choose (during a second compilation) if some of my passes are applicable or not.

Profile-guided optimization (PGO) [1] … mumble…mumble. Clang/LLVM has infrastructure for that [2]. I somehow can’t imagine that it doesn’t provide call frequencies and timing. In any case that’s probably where to start.

HTH,

d

[1] https://en.wikipedia.org/wiki/Profile-guided_optimization
[2] http://clang.llvm.org/docs/UsersManual.html#profile-guided-optimization

> 
> Greetings,
> 
> Johan
> 
> On 17 Jul 2015, at 16:09, Kenneth Adam Miller <kennethadammiller at gmail.com<mailto:kennethadammiller at gmail.com>> wrote:
> 
> Have you seen intel pintools? You might not need to write near as much code, however it may not suit your use case because the compiler can see information that otherwise might be missed in the context of a fully compiled binary. Please let me know your thoughts and then we can pick up from there.
> 
> On Fri, Jul 17, 2015 at 2:43 AM, Wehrli Johan <johan.wehrli at heig-vd.ch<mailto:johan.wehrli at heig-vd.ch>> wrote:
> Hi everyone,
> 
> I would like to instrument my code in order to know the number of times a function is called and its execution time.
> 
> After some research, I find several leads in llvm/lib/ProfilData/ and llvm/lib/Transform/Instrumentation/ but nothing conclusive.
> 
> Does anyone know if this is already possible with LLVM or has a good suggestion for the beginning?
> 
> I saw the -fprofile-instr-generate, -fprofile-instr-use, -fprofile-arcs, -ftest-coverage parameters but I can’t get the information I want with it.
> 
> It seem that the easiest solution is to write a pass who will instrument the code.
> 
> Greetings,
> 
> Johan
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu>         http://llvm.cs.uiuc.edu<http://llvm.cs.uiuc.edu/>
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 
> 
> _______________________________________________
> 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