Eric Soderstrom
2014-Aug-17 16:40 UTC
[LLVMdev] generating a dynamic callgraph with llvm-prof
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? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140817/0651e0f9/attachment.html>
John Criswell
2014-Aug-17 19:25 UTC
[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 list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140817/3863fc8e/attachment.html>
Sahoo, Swarup Kumar
2014-Aug-18 06:04 UTC
[LLVMdev] generating a dynamic callgraph with llvm-prof
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 list LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140818/37ae8b84/attachment.html>