2003-11-02 02:10:54 +00:00
|
|
|
<html>
|
|
|
|
<title>LLVM: llvm-prof tool</title>
|
|
|
|
|
|
|
|
<body bgcolor=white>
|
|
|
|
|
|
|
|
<center><h1>LLVM: <tt>llvm-prof</tt> tool</h1></center>
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
<h3>NAME</h3>
|
|
|
|
<tt>llvm-prof</tt>
|
|
|
|
|
|
|
|
<h3>SYNOPSIS</h3>
|
2004-02-10 18:04:24 +00:00
|
|
|
<tt>llvm-prof [options] [bytecode file] [llvmprof.out]</tt>
|
2003-11-02 02:10:54 +00:00
|
|
|
|
|
|
|
<h3>DESCRIPTION</h3>
|
|
|
|
|
2004-02-10 18:04:24 +00:00
|
|
|
The <tt>llvm-prof</tt> tool reads in an '<tt>llvmprof.out</tt>' file (which can
|
|
|
|
optionally use a specific file with the third program argument), a bytecode file
|
|
|
|
for the program, and produces a human readable report, suitable for determining
|
|
|
|
where the program hotspots are.<p>
|
2003-11-02 02:10:54 +00:00
|
|
|
|
2004-02-10 18:04:24 +00:00
|
|
|
This program is often used in conjunction with the <tt>utils/profile.pl</tt>
|
2003-11-02 05:20:44 +00:00
|
|
|
script. This script automatically instruments a program, runs it with the JIT,
|
|
|
|
then runs <tt>llvm-prof</tt> to format a report. To get more information about
|
2004-02-10 18:04:24 +00:00
|
|
|
<tt>utils/profile.pl</tt>, execute it with the <tt>--help</tt> option.<p>
|
2003-11-02 02:10:54 +00:00
|
|
|
|
|
|
|
<h3>OPTIONS</h3>
|
|
|
|
|
|
|
|
<ul>
|
2003-11-06 20:29:33 +00:00
|
|
|
<li><tt>--annotated-llvm</tt> or <tt>-A</tt><br>
|
2003-11-02 02:10:54 +00:00
|
|
|
|
|
|
|
In addition to the normal report printed, print out the code for the
|
2004-03-12 22:45:35 +00:00
|
|
|
program, annotated with execution frequency information. This can be
|
2003-11-02 02:10:54 +00:00
|
|
|
particularly useful when trying to visualize how frequently basic blocks
|
|
|
|
are executed. This is most useful with basic block profiling
|
|
|
|
information or better.<p>
|
2003-11-06 20:29:33 +00:00
|
|
|
|
|
|
|
<li><tt>--print-all-code</tt><br>
|
|
|
|
|
|
|
|
Using this option enables the <tt>--annotated-llvm</tt> option, but it
|
|
|
|
prints the entire module, instead of just the most commonly executed
|
|
|
|
functions.<p>
|
2004-03-12 22:45:35 +00:00
|
|
|
|
|
|
|
<li><tt>-time-passes</tt><br>
|
|
|
|
|
|
|
|
Record the amount of time needed for each pass and print it to standard
|
|
|
|
error.
|
2003-11-02 02:10:54 +00:00
|
|
|
</ul>
|
|
|
|
|
|
|
|
<h3>EXIT STATUS</h3>
|
|
|
|
|
|
|
|
<tt>llvm-prof</tt> returns 1 if it cannot load the bytecode file or the profile
|
2004-03-12 22:45:35 +00:00
|
|
|
information. Otherwise, it exits with zero.
|
2003-11-02 02:10:54 +00:00
|
|
|
|
|
|
|
<HR>
|
|
|
|
Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
|
|
|
|
</body>
|
|
|
|
</html>
|