blob: 597d38e8e4b6d94a49751d67464f5457428b0563 [file] [log] [blame]
Chris Lattnerd57aa5e82003-11-02 02:10:54 +00001<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] [LLVM passes]</tt>
14
15<h3>DESCRIPTION</h3>
16
17The <tt>llvm-prof</tt> tool reads in an '<tt>llvmprof.out</tt>' file, a bytecode
18file for the program, and produces a human readable report, suitable for
19determining where the program hotspots are.<p>
20
Chris Lattner38e692d2003-11-02 05:20:44 +000021This program is often used in conjunction with the <tt>utils/profile.sh</tt>
22script. This script automatically instruments a program, runs it with the JIT,
23then runs <tt>llvm-prof</tt> to format a report. To get more information about
24<tt>utils/profile.sh</tt>, execute it with the <tt>--help</tt> option.<p>
Chris Lattnerd57aa5e82003-11-02 02:10:54 +000025
26<h3>OPTIONS</h3>
27
28<ul>
Chris Lattnerdc79f6c2003-11-06 20:29:33 +000029 <li><tt>--annotated-llvm</tt> or <tt>-A</tt><br>
Chris Lattnerd57aa5e82003-11-02 02:10:54 +000030
31 In addition to the normal report printed, print out the code for the
32 program, annotated we execution frequency information. This can be
33 particularly useful when trying to visualize how frequently basic blocks
34 are executed. This is most useful with basic block profiling
35 information or better.<p>
Chris Lattnerdc79f6c2003-11-06 20:29:33 +000036
37 <li><tt>--print-all-code</tt><br>
38
39 Using this option enables the <tt>--annotated-llvm</tt> option, but it
40 prints the entire module, instead of just the most commonly executed
41 functions.<p>
Chris Lattnerd57aa5e82003-11-02 02:10:54 +000042</ul>
43
44<h3>EXIT STATUS</h3>
45
46<tt>llvm-prof</tt> returns 1 if it cannot load the bytecode file or the profile
47information, otherwise it exits with zero.
48
49<HR>
50Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
51</body>
52</html>