Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 1 | llvm-profdata - Profile data tool |
| 2 | ================================= |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 3 | |
| 4 | SYNOPSIS |
| 5 | -------- |
| 6 | |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 7 | :program:`llvm-profdata` *command* [*args...*] |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 8 | |
| 9 | DESCRIPTION |
| 10 | ----------- |
| 11 | |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 12 | The :program:`llvm-profdata` tool is a small utility for working with profile |
| 13 | data files. |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 14 | |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 15 | COMMANDS |
| 16 | -------- |
| 17 | |
Justin Bogner | 22b9f6a | 2015-03-12 01:38:50 +0000 | [diff] [blame] | 18 | * :ref:`merge <profdata-merge>` |
| 19 | * :ref:`show <profdata-show>` |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 20 | |
| 21 | .. program:: llvm-profdata merge |
| 22 | |
Justin Bogner | 22b9f6a | 2015-03-12 01:38:50 +0000 | [diff] [blame] | 23 | .. _profdata-merge: |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 24 | |
| 25 | MERGE |
| 26 | ----- |
| 27 | |
| 28 | SYNOPSIS |
| 29 | ^^^^^^^^ |
| 30 | |
| 31 | :program:`llvm-profdata merge` [*options*] [*filenames...*] |
| 32 | |
| 33 | DESCRIPTION |
| 34 | ^^^^^^^^^^^ |
| 35 | |
| 36 | :program:`llvm-profdata merge` takes several profile data files |
| 37 | generated by PGO instrumentation and merges them together into a single |
| 38 | indexed profile data file. |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 39 | |
| 40 | OPTIONS |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 41 | ^^^^^^^ |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 42 | |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 43 | .. option:: -help |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 44 | |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 45 | Print a summary of command line options. |
| 46 | |
| 47 | .. option:: -output=output, -o=output |
| 48 | |
| 49 | Specify the output file name. *Output* cannot be ``-`` as the resulting |
| 50 | indexed profile data can't be written to standard output. |
| 51 | |
Diego Novillo | 6555adb | 2015-05-28 21:57:17 +0000 | [diff] [blame] | 52 | .. option:: -instr (default) |
| 53 | |
Xinliang David Li | 6f7c19a | 2015-11-23 20:47:38 +0000 | [diff] [blame^] | 54 | Specify that the input profile is an instrumentation-based profile. When |
| 55 | using instrumentation-based profiles, the format of the generated file |
| 56 | can be generated in one of the two ways: |
| 57 | |
| 58 | .. option:: -binary (default) |
| 59 | |
| 60 | Emit the profile using a binary encoding in indexed profile format. |
| 61 | |
| 62 | .. option:: -text |
| 63 | |
| 64 | Emit the profile in text format. |
Diego Novillo | 6555adb | 2015-05-28 21:57:17 +0000 | [diff] [blame] | 65 | |
| 66 | .. option:: -sample |
| 67 | |
| 68 | Specify that the input profile is a sample-based profile. When using |
| 69 | sample-based profiles, the format of the generated file can be generated |
| 70 | in one of three ways: |
| 71 | |
| 72 | .. option:: -binary (default) |
| 73 | |
| 74 | Emit the profile using a binary encoding. |
| 75 | |
| 76 | .. option:: -text |
| 77 | |
| 78 | Emit the profile in text mode. |
| 79 | |
| 80 | .. option:: -gcc |
| 81 | |
| 82 | Emit the profile using GCC's gcov format (Not yet supported). |
| 83 | |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 84 | .. program:: llvm-profdata show |
| 85 | |
Justin Bogner | 22b9f6a | 2015-03-12 01:38:50 +0000 | [diff] [blame] | 86 | .. _profdata-show: |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 87 | |
| 88 | SHOW |
| 89 | ---- |
| 90 | |
| 91 | SYNOPSIS |
| 92 | ^^^^^^^^ |
| 93 | |
| 94 | :program:`llvm-profdata show` [*options*] [*filename*] |
| 95 | |
| 96 | DESCRIPTION |
| 97 | ^^^^^^^^^^^ |
| 98 | |
| 99 | :program:`llvm-profdata show` takes a profile data file and displays the |
| 100 | information about the profile counters for this file and |
| 101 | for any of the specified function(s). |
| 102 | |
| 103 | If *filename* is omitted or is ``-``, then **llvm-profdata show** reads its |
| 104 | input from standard input. |
| 105 | |
| 106 | OPTIONS |
| 107 | ^^^^^^^ |
| 108 | |
| 109 | .. option:: -all-functions |
| 110 | |
| 111 | Print details for every function. |
| 112 | |
| 113 | .. option:: -counts |
| 114 | |
| 115 | Print the counter values for the displayed functions. |
| 116 | |
| 117 | .. option:: -function=string |
| 118 | |
| 119 | Print details for a function if the function's name contains the given string. |
| 120 | |
| 121 | .. option:: -help |
| 122 | |
| 123 | Print a summary of command line options. |
| 124 | |
| 125 | .. option:: -output=output, -o=output |
| 126 | |
| 127 | Specify the output file name. If *output* is ``-`` or it isn't specified, |
| 128 | then the output is sent to standard output. |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 129 | |
Diego Novillo | 6555adb | 2015-05-28 21:57:17 +0000 | [diff] [blame] | 130 | .. option:: -instr (default) |
| 131 | |
| 132 | Specify that the input profile is an instrumentation-based profile. |
| 133 | |
Xinliang David Li | 6f7c19a | 2015-11-23 20:47:38 +0000 | [diff] [blame^] | 134 | .. option:: -text |
| 135 | |
| 136 | Instruct the profile dumper to show profile counts in the text format of the |
| 137 | instrumentation-based profile data representation. By default, the profile |
| 138 | information is dumped in a more human readable form (also in text) with |
| 139 | annotations. |
| 140 | |
Diego Novillo | 6555adb | 2015-05-28 21:57:17 +0000 | [diff] [blame] | 141 | .. option:: -sample |
| 142 | |
| 143 | Specify that the input profile is a sample-based profile. |
| 144 | |
Duncan P. N. Exon Smith | 846a627 | 2014-02-17 23:22:49 +0000 | [diff] [blame] | 145 | EXIT STATUS |
| 146 | ----------- |
| 147 | |
Alex Lorenz | bf4508b | 2014-07-30 20:30:11 +0000 | [diff] [blame] | 148 | :program:`llvm-profdata` returns 1 if the command is omitted or is invalid, |
| 149 | if it cannot read input files, or if there is a mismatch between their data. |