| Brian Gaeke | c556594 | 2004-05-14 18:03:22 +0000 | [diff] [blame] | 1 | =pod | 
|  | 2 |  | 
|  | 3 | =head1 NAME | 
|  | 4 |  | 
| Brian Gaeke | 1274e44 | 2004-05-14 18:31:13 +0000 | [diff] [blame] | 5 | llvm-prof - print execution profile of LLVM program | 
| Brian Gaeke | c556594 | 2004-05-14 18:03:22 +0000 | [diff] [blame] | 6 |  | 
|  | 7 | =head1 SYNOPSIS | 
|  | 8 |  | 
| Gabor Greif | 6c0bda8 | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 9 | B<llvm-prof> [I<options>] [I<bitcode file>] [I<llvmprof.out>] | 
| Brian Gaeke | c556594 | 2004-05-14 18:03:22 +0000 | [diff] [blame] | 10 |  | 
|  | 11 | =head1 DESCRIPTION | 
|  | 12 |  | 
|  | 13 | The B<llvm-prof> tool reads in an F<llvmprof.out> file (which can | 
| Gabor Greif | 6c0bda8 | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 14 | optionally use a specific file with the third program argument), a bitcode file | 
| Brian Gaeke | c556594 | 2004-05-14 18:03:22 +0000 | [diff] [blame] | 15 | for the program, and produces a human readable report, suitable for determining | 
|  | 16 | where the program hotspots are. | 
|  | 17 |  | 
|  | 18 | This program is often used in conjunction with the F<utils/profile.pl> | 
|  | 19 | script.  This script automatically instruments a program, runs it with the JIT, | 
|  | 20 | then runs B<llvm-prof> to format a report.  To get more information about | 
|  | 21 | F<utils/profile.pl>, execute it with the B<--help> option. | 
|  | 22 |  | 
|  | 23 | =head1 OPTIONS | 
|  | 24 |  | 
|  | 25 | =over | 
|  | 26 |  | 
|  | 27 | =item B<--annotated-llvm> or B<-A> | 
|  | 28 |  | 
|  | 29 | In addition to the normal report printed, print out the code for the | 
|  | 30 | program, annotated with execution frequency information. This can be | 
|  | 31 | particularly useful when trying to visualize how frequently basic blocks | 
|  | 32 | are executed.  This is most useful with basic block profiling | 
|  | 33 | information or better. | 
|  | 34 |  | 
|  | 35 | =item B<--print-all-code> | 
|  | 36 |  | 
|  | 37 | Using this option enables the B<--annotated-llvm> option, but it | 
|  | 38 | prints the entire module, instead of just the most commonly executed | 
|  | 39 | functions. | 
|  | 40 |  | 
|  | 41 | =item B<--time-passes> | 
|  | 42 |  | 
|  | 43 | Record the amount of time needed for each pass and print it to standard | 
|  | 44 | error. | 
|  | 45 |  | 
|  | 46 | =back | 
|  | 47 |  | 
|  | 48 | =head1 EXIT STATUS | 
|  | 49 |  | 
| Gabor Greif | 6c0bda8 | 2007-07-09 11:24:05 +0000 | [diff] [blame] | 50 | B<llvm-prof> returns 1 if it cannot load the bitcode file or the profile | 
| Misha Brukman | da25907 | 2004-11-15 20:30:19 +0000 | [diff] [blame] | 51 | information. Otherwise, it exits with zero. | 
| Brian Gaeke | c556594 | 2004-05-14 18:03:22 +0000 | [diff] [blame] | 52 |  | 
|  | 53 | =head1 AUTHOR | 
|  | 54 |  | 
| Reid Spencer | 85d182f | 2006-03-14 05:42:07 +0000 | [diff] [blame] | 55 | B<llvm-prof> is maintained by the LLVM Team (L<http://llvm.org>). | 
| Brian Gaeke | c556594 | 2004-05-14 18:03:22 +0000 | [diff] [blame] | 56 |  | 
|  | 57 | =cut |