blob: 5f1c48dcc1ebd5bb289b0b33e3dd5d1fef7855fd [file] [log] [blame]
Chris Lattnere66e73a2003-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>
Chris Lattner1fa3dab2004-02-10 18:04:24 +000013<tt>llvm-prof [options] [bytecode file] [llvmprof.out]</tt>
Chris Lattnere66e73a2003-11-02 02:10:54 +000014
15<h3>DESCRIPTION</h3>
16
Chris Lattner1fa3dab2004-02-10 18:04:24 +000017The <tt>llvm-prof</tt> tool reads in an '<tt>llvmprof.out</tt>' file (which can
18optionally use a specific file with the third program argument), a bytecode file
19for the program, and produces a human readable report, suitable for determining
20where the program hotspots are.<p>
Chris Lattnere66e73a2003-11-02 02:10:54 +000021
Chris Lattner1fa3dab2004-02-10 18:04:24 +000022This program is often used in conjunction with the <tt>utils/profile.pl</tt>
Chris Lattnerf22d8432003-11-02 05:20:44 +000023script. This script automatically instruments a program, runs it with the JIT,
24then runs <tt>llvm-prof</tt> to format a report. To get more information about
Chris Lattner1fa3dab2004-02-10 18:04:24 +000025<tt>utils/profile.pl</tt>, execute it with the <tt>--help</tt> option.<p>
Chris Lattnere66e73a2003-11-02 02:10:54 +000026
27<h3>OPTIONS</h3>
28
29<ul>
Chris Lattner934c9c92003-11-06 20:29:33 +000030 <li><tt>--annotated-llvm</tt> or <tt>-A</tt><br>
Chris Lattnere66e73a2003-11-02 02:10:54 +000031
32 In addition to the normal report printed, print out the code for the
33 program, annotated we 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>
Chris Lattner934c9c92003-11-06 20:29:33 +000037
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>
Chris Lattnere66e73a2003-11-02 02:10:54 +000043</ul>
44
45<h3>EXIT STATUS</h3>
46
47<tt>llvm-prof</tt> returns 1 if it cannot load the bytecode file or the profile
48information, otherwise it exits with zero.
49
50<HR>
51Maintained by the <a href="http://llvm.cs.uiuc.edu">LLVM Team</a>.
52</body>
53</html>