Fix link to llvmgcc.
[oota-llvm.git] / docs / CommandGuide / llvm-prof.html
1 <html>
2 <title>LLVM: llvm-prof tool</title>
3
4 <body bgcolor=white>
5
6 <center><h1>LLVM: <tt>llvm-prof</tt> tool</h1></center>
7 <HR>
8
9 <h3>NAME</h3>
10 <tt>llvm-prof</tt>
11
12 <h3>SYNOPSIS</h3>
13 <tt>llvm-prof [options] [bytecode file] [llvmprof.out]</tt>
14
15 <h3>DESCRIPTION</h3>
16
17 The <tt>llvm-prof</tt> tool reads in an '<tt>llvmprof.out</tt>' file (which can
18 optionally use a specific file with the third program argument), a bytecode file
19 for the program, and produces a human readable report, suitable for determining
20 where the program hotspots are.<p>
21
22 This program is often used in conjunction with the <tt>utils/profile.pl</tt>
23 script.  This script automatically instruments a program, runs it with the JIT,
24 then runs <tt>llvm-prof</tt> to format a report.  To get more information about
25 <tt>utils/profile.pl</tt>, execute it with the <tt>--help</tt> option.<p>
26
27 <h3>OPTIONS</h3>
28
29 <ul>
30         <li><tt>--annotated-llvm</tt> or <tt>-A</tt><br>
31
32         In addition to the normal report printed, print out the code for the
33         program, annotated with execution frequency information. This can be
34         particularly useful when trying to visualize how frequently basic blocks
35         are executed.  This is most useful with basic block profiling
36         information or better.<p>
37
38         <li><tt>--print-all-code</tt><br>
39
40         Using this option enables the <tt>--annotated-llvm</tt> option, but it
41         prints the entire module, instead of just the most commonly executed
42         functions.<p>
43
44         <li><tt>-time-passes</tt><br>
45
46         Record the amount of time needed for each pass and print it to standard
47         error.
48 </ul>
49
50 <h3>EXIT STATUS</h3>
51
52 <tt>llvm-prof</tt> returns 1 if it cannot load the bytecode file or the profile
53 information. Otherwise, it exits with zero.
54
55 <HR>
56 Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
57 </body>
58 </html>