<div dir="ltr">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.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jul 17, 2015 at 2:43 AM, Wehrli Johan <span dir="ltr"><<a href="mailto:johan.wehrli@heig-vd.ch" target="_blank">johan.wehrli@heig-vd.ch</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everyone,<br>
<br>
I would like to instrument my code in order to know the number of times a function is called and its execution time.<br>
<br>
After some research, I find several leads in llvm/lib/ProfilData/ and llvm/lib/Transform/Instrumentation/ but nothing conclusive.<br>
<br>
Does anyone know if this is already possible with LLVM or has a good suggestion for the beginning?<br>
<br>
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.<br>
<br>
It seem that the easiest solution is to write a pass who will instrument the code.<br>
<br>
Greetings,<br>
<br>
Johan<br>
<br>
_______________________________________________<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" rel="noreferrer" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" rel="noreferrer" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
</blockquote></div><br></div>