fateme Hoseini via llvm-dev
2016-May-13 14:35 UTC
[llvm-dev] Access to dynamic execution information.
Hi Does LLVM dynamically run the program to obtain profiling information like branch weight? if so, can we access the information regarding this run like the number of instructions that have been executed dynamically between two specific points of the program? Thanks -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160513/d912688e/attachment.html>
Manuel Rigger via llvm-dev
2016-May-13 22:16 UTC
[llvm-dev] Access to dynamic execution information.
Hi, depending on your specific use case you could have a look at the Sulong project (https://github.com/graalvm/sulong/). Sulong can execute LLVM IR programs and gathers profiling information during the program's execution. For example, Sulong profiles the frequency of successor blocks in the interpreter, to then communicate it to the dynamic compiler for better optimization [1]. Similarly, you could implement a node that counts the number of executed instructions between two points in the program and instantiate it in the parser [2]. - Manuel [1] https://github.com/graalvm/sulong/blob/master/projects/com.oracle.truffle.llvm.nodes.impl/src/com/oracle/truffle/llvm/nodes/impl/base/LLVMBasicBlockNode.java [2] https://github.com/graalvm/sulong/blob/master/projects/com.oracle.truffle.llvm.parser.impl/src/com/oracle/truffle/llvm/parser/impl/LLVMVisitor.java 2016-05-13 16:35 GMT+02:00 fateme Hoseini via llvm-dev < llvm-dev at lists.llvm.org>:> Hi > Does LLVM dynamically run the program to obtain profiling information like > branch weight? if so, can we access the information regarding this run like > the number of instructions that have been executed dynamically between two > specific points of the program? > > Thanks > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160514/eeaaad0a/attachment.html>
Chandler Carruth via llvm-dev
2016-May-16 00:53 UTC
[llvm-dev] Access to dynamic execution information.
On Fri, May 13, 2016 at 8:35 AM fateme Hoseini via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi > Does LLVM dynamically run the program to obtain profiling information like > branch weight? >No, the profile information is either collected via instrumentation of the program or via external sampling profilers. It is then read back into the IR by the frontend or an optimization pass.> if so, can we access the information regarding this run like the number of > instructions that have been executed dynamically between two specific > points of the program? >If Manuel Rigger's suggestion doesn't work, maybe try Valgrind which can get these kinds of instruction counts? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160516/9b006325/attachment.html>
fateme Hoseini via llvm-dev
2016-Jun-02 16:00 UTC
[llvm-dev] Access to dynamic execution information.
Thank you for your reply. No, the profile information is either collected via instrumentation of the> program or via external sampling profilers. It is then read back into the > IR by the frontend or an optimization pass. >Does LLVM use instruction instrumention? I am particularly looking for a program that create this profiling information dynamically, i.e., from the machine code. And preferably has the fault injection, detection ability. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160602/a45ccd63/attachment.html>