[LLVMdev] generating a dynamic callgraph with llvm-prof
Eric Soderstrom
e_k_s at mit.edu
Fri Aug 22 16:31:17 PDT 2014
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)
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".
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.
Could you point me in the right direction for how to extract basic block
execution profile information from a trace file?
thank you for the help!
On Mon, Aug 18, 2014 at 2:04 AM, Sahoo, Swarup Kumar <ssahoo2 at illinois.edu>
wrote:
> Yes, the latest version can be downloaded from here
> https://github.com/liuml07/giri . The LLVM instrumentation code is in
> TracingNoGiri.cpp
> <https://github.com/liuml07/giri/blob/master/lib/Giri/TracingNoGiri.cpp>
> file and runtime code in Tracing.cpp.
>
> You may need to delete other unnecessary instrumentation code which you
> don't need.
>
> Thanks,
> Swarup.
>
> ------------------------------
> *From:* John Criswell [jtcriswel at gmail.com]
> *Sent:* Sunday, August 17, 2014 2:25 PM
> *To:* Eric Soderstrom; llvmdev
> *Cc:* Sahoo, Swarup Kumar
> *Subject:* Re: [LLVMdev] generating a dynamic callgraph with llvm-prof
>
> Dear Eric,
>
> 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.
>
> Swarup, is that code publicly available somewhere?
>
> Regards,
>
> John Criswell
>
> On 8/17/14, 12:40 PM, Eric Soderstrom wrote:
>
> 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]
>
> Is this feasible with with llvm-prof and any of the existing profiling
> options?
>
>
> _______________________________________________
> LLVM Developers mailing listLLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.eduhttp://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
>
--
Eric Söderström
MIT - 2012
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140822/4590651c/attachment.html>
More information about the llvm-dev
mailing list