blob: 210826a7babcd5a26059bb0261ae76fece5341e9 [file] [log] [blame]
Alex Lorenzbf4508b2014-07-30 20:30:11 +00001llvm-profdata - Profile data tool
2=================================
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +00003
4SYNOPSIS
5--------
6
Alex Lorenzbf4508b2014-07-30 20:30:11 +00007:program:`llvm-profdata` *command* [*args...*]
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +00008
9DESCRIPTION
10-----------
11
Alex Lorenzbf4508b2014-07-30 20:30:11 +000012The :program:`llvm-profdata` tool is a small utility for working with profile
13data files.
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +000014
Alex Lorenzbf4508b2014-07-30 20:30:11 +000015COMMANDS
16--------
17
Justin Bogner22b9f6a2015-03-12 01:38:50 +000018* :ref:`merge <profdata-merge>`
19* :ref:`show <profdata-show>`
Alex Lorenzbf4508b2014-07-30 20:30:11 +000020
21.. program:: llvm-profdata merge
22
Justin Bogner22b9f6a2015-03-12 01:38:50 +000023.. _profdata-merge:
Alex Lorenzbf4508b2014-07-30 20:30:11 +000024
25MERGE
26-----
27
28SYNOPSIS
29^^^^^^^^
30
Nathan Slingerlandcb921a12015-12-04 02:13:58 +000031:program:`llvm-profdata merge` [*options*] [*filenames...*]
Alex Lorenzbf4508b2014-07-30 20:30:11 +000032
33DESCRIPTION
34^^^^^^^^^^^
35
36:program:`llvm-profdata merge` takes several profile data files
37generated by PGO instrumentation and merges them together into a single
38indexed profile data file.
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +000039
40OPTIONS
Alex Lorenzbf4508b2014-07-30 20:30:11 +000041^^^^^^^
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +000042
Alex Lorenzbf4508b2014-07-30 20:30:11 +000043.. option:: -help
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +000044
Alex Lorenzbf4508b2014-07-30 20:30:11 +000045 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 Novillo6555adb2015-05-28 21:57:17 +000052.. option:: -instr (default)
53
Xinliang David Li2fc25152015-11-24 20:48:25 +000054 Specify that the input profile is an instrumentation-based profile.
Diego Novillo6555adb2015-05-28 21:57:17 +000055
56.. option:: -sample
57
Xinliang David Li2fc25152015-11-24 20:48:25 +000058 Specify that the input profile is a sample-based profile.
59
60 The format of the generated file can be generated in one of three ways:
Diego Novillo6555adb2015-05-28 21:57:17 +000061
62 .. option:: -binary (default)
63
Xinliang David Li2fc25152015-11-24 20:48:25 +000064 Emit the profile using a binary encoding. For instrumentation-based profile
65 the output format is the indexed binary format.
Diego Novillo6555adb2015-05-28 21:57:17 +000066
67 .. option:: -text
68
Xinliang David Li2fc25152015-11-24 20:48:25 +000069 Emit the profile in text mode. This option can also be used with both
70 sample-based and instrumentation-based profile. When this option is used
71 the profile will be dumped in the text format that is parsable by the profile
72 reader.
Diego Novillo6555adb2015-05-28 21:57:17 +000073
74 .. option:: -gcc
75
76 Emit the profile using GCC's gcov format (Not yet supported).
77
Alex Lorenzbf4508b2014-07-30 20:30:11 +000078.. program:: llvm-profdata show
79
Justin Bogner22b9f6a2015-03-12 01:38:50 +000080.. _profdata-show:
Alex Lorenzbf4508b2014-07-30 20:30:11 +000081
82SHOW
83----
84
85SYNOPSIS
86^^^^^^^^
87
88:program:`llvm-profdata show` [*options*] [*filename*]
89
90DESCRIPTION
91^^^^^^^^^^^
92
93:program:`llvm-profdata show` takes a profile data file and displays the
94information about the profile counters for this file and
95for any of the specified function(s).
96
97If *filename* is omitted or is ``-``, then **llvm-profdata show** reads its
98input from standard input.
99
100OPTIONS
101^^^^^^^
102
103.. option:: -all-functions
104
105 Print details for every function.
106
107.. option:: -counts
108
109 Print the counter values for the displayed functions.
110
111.. option:: -function=string
112
113 Print details for a function if the function's name contains the given string.
114
115.. option:: -help
116
117 Print a summary of command line options.
118
119.. option:: -output=output, -o=output
120
121 Specify the output file name. If *output* is ``-`` or it isn't specified,
122 then the output is sent to standard output.
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +0000123
Diego Novillo6555adb2015-05-28 21:57:17 +0000124.. option:: -instr (default)
125
126 Specify that the input profile is an instrumentation-based profile.
127
Xinliang David Li6f7c19a2015-11-23 20:47:38 +0000128.. option:: -text
129
130 Instruct the profile dumper to show profile counts in the text format of the
131 instrumentation-based profile data representation. By default, the profile
132 information is dumped in a more human readable form (also in text) with
133 annotations.
134
Diego Novillo6555adb2015-05-28 21:57:17 +0000135.. option:: -sample
136
137 Specify that the input profile is a sample-based profile.
138
Duncan P. N. Exon Smith846a6272014-02-17 23:22:49 +0000139EXIT STATUS
140-----------
141
Alex Lorenzbf4508b2014-07-30 20:30:11 +0000142:program:`llvm-profdata` returns 1 if the command is omitted or is invalid,
143if it cannot read input files, or if there is a mismatch between their data.