<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Dear Eric,<br>
<br>
This file has code which prints the trace in readable format.<br>
<a href="https://github.com/liuml07/giri/blob/master/tools/PrintTrace/PrintTrace.cpp" target="_blank">https://github.com/liuml07/giri/blob/master/tools/PrintTrace/PrintTrace.cpp</a><br>
<br>
You can additional details from <span class="css-truncate css-truncate-target"><a href="https://github.com/liuml07/giri/blob/master/lib/Giri/TraceFile.cpp" class="js-directory-link" id="b36ae7e7f9753edc4f108cf8fb706b25-123704fcef448c8d267755ae330682c56c2d8627" title="TraceFile.cpp">TraceFile.cpp</a>
 (and </span><span class="css-truncate css-truncate-target"><span class="css-truncate css-truncate-target"><a href="https://github.com/liuml07/giri/blob/master/lib/Giri/Giri.cpp" class="js-directory-link" id="a862293cac96a85cbe549b791b5f561d-76079d56281a48e9c48b95cabec4d25c91ef9aee" title="Giri.cpp">Giri.cpp</a>)
 about how we read and use Basic Block information. Hope this will help you.<br>
<br>
Thanks,<br>
Swarup.<br>
</span><br>
</span>
<div style="font-family: Times New Roman; color: #000000; font-size: 16px">
<hr tabindex="-1">
<div style="direction: ltr;" id="divRpF897783"><font color="#000000" face="Tahoma" size="2"><b>From:</b> ericsoderstrom@gmail.com [ericsoderstrom@gmail.com] on behalf of Eric Soderstrom [e_k_s@mit.edu]<br>
<b>Sent:</b> Friday, August 22, 2014 6:31 PM<br>
<b>To:</b> Sahoo, Swarup Kumar<br>
<b>Cc:</b> John Criswell; llvmdev<br>
<b>Subject:</b> Re: [LLVMdev] generating a dynamic callgraph with llvm-prof<br>
</font><br>
</div>
<div></div>
<div>
<div dir="ltr">
<div>
<div>
<div>
<div>Thank you. I've compiled giri, and looked through the source code. It seems like it should do exactly what I want (record each basic block execution)<br>
</div>
By inspecting the test Makefiles, I can see how to generate an instrumented binary, "example.trace.exe", and running the instrumented binary produces a trace file "example.trace".<br>
<br>
</div>
Presumably, the basic block execution profile is stored in these trace files. But it's not entirely clear to me how to interpret the resulting .trace file. EntryCache doesn't provide any methods for actually reading cache contents.<br>
<br>
</div>
Could you point me in the right direction for how to extract basic block execution profile information from a trace file?
<br>
<br>
</div>
thank you for the help!<br>
</div>
<div class="gmail_extra"><br>
<br>
<div class="gmail_quote">On Mon, Aug 18, 2014 at 2:04 AM, Sahoo, Swarup Kumar <span dir="ltr">
<<a href="mailto:ssahoo2@illinois.edu" target="_blank">ssahoo2@illinois.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div bgcolor="#FFFFFF">
<div style="direction:ltr; font-family:Tahoma; color:#000000; font-size:10pt">Yes, the latest version can be downloaded from here
<a href="https://github.com/liuml07/giri" target="_blank">https://github.com/liuml07/giri</a> . The LLVM instrumentation code is in
<span><a href="https://github.com/liuml07/giri/blob/master/lib/Giri/TracingNoGiri.cpp" title="TracingNoGiri.cpp" target="_blank">TracingNoGiri.cpp</a> file and runtime code in Tracing.cpp.
<br>
<br>
You may need to delete other unnecessary instrumentation code which you don't need.<br>
<br>
Thanks,<br>
Swarup.<br>
<br>
</span>
<div style="font-family:Times New Roman; color:#000000; font-size:16px">
<hr>
<div style="direction:ltr"><font color="#000000" face="Tahoma"><b>From:</b> John Criswell [<a href="mailto:jtcriswel@gmail.com" target="_blank">jtcriswel@gmail.com</a>]<br>
<b>Sent:</b> Sunday, August 17, 2014 2:25 PM<br>
<b>To:</b> Eric Soderstrom; llvmdev<br>
<b>Cc:</b> Sahoo, Swarup Kumar<br>
<b>Subject:</b> Re: [LLVMdev] generating a dynamic callgraph with llvm-prof<br>
</font><br>
</div>
<div>
<div class="h5">
<div></div>
<div>
<div>Dear Eric,<br>
<br>
Swarup and I wrote a dynamic slicing system called Giri several years ago that recorded the execution of every call instruction.  It's not in the LLVM tree, and I don't think it works with the latest version of LLVM, but it'll give you what you want.<br>
<br>
Swarup, is that code publicly available somewhere?<br>
<br>
Regards,<br>
<br>
John Criswell<br>
<br>
On 8/17/14, 12:40 PM, Eric Soderstrom wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>One can use "-insert-edge-profiling" with opt to collect general metrics (frequency of function execution, frequency of basic block execution). But I'd like to record all call information. So every time a function call is made, I'd like to record [calling
 function name, callee function name]<br>
<br>
</div>
Is this feasible with with llvm-prof and any of the existing profiling options?<br>
</div>
<br>
<fieldset target="_blank"></fieldset> <br>
<pre>_______________________________________________
LLVM Developers mailing list
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>         <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
</pre>
</blockquote>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
<br>
<br clear="all">
<br>
-- <br>
Eric Söderström<br>
MIT  -  2012 </div>
</div>
</div>
</div>
</body>
</html>