]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/llvm-profdata/llvm-profdata.1
Merge clang trunk r351319, resolve conflicts, and update FREEBSD-Xlist.
[FreeBSD/FreeBSD.git] / usr.bin / clang / llvm-profdata / llvm-profdata.1
1 .\" $FreeBSD$
2 .\" Man page generated from reStructuredText.
3 .
4 .TH "LLVM-PROFDATA" "1" "2018-08-02" "7" "LLVM"
5 .SH NAME
6 llvm-profdata \- Profile data tool
7 .
8 .nr rst2man-indent-level 0
9 .
10 .de1 rstReportMargin
11 \\$1 \\n[an-margin]
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
14 -
15 \\n[rst2man-indent0]
16 \\n[rst2man-indent1]
17 \\n[rst2man-indent2]
18 ..
19 .de1 INDENT
20 .\" .rstReportMargin pre:
21 . RS \\$1
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
25 ..
26 .de UNINDENT
27 . RE
28 .\" indent \\n[an-margin]
29 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
30 .nr rst2man-indent-level -1
31 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
32 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
33 ..
34 .SH SYNOPSIS
35 .sp
36 \fBllvm\-profdata\fP \fIcommand\fP [\fIargs...\fP]
37 .SH DESCRIPTION
38 .sp
39 The \fBllvm\-profdata\fP tool is a small utility for working with profile
40 data files.
41 .SH COMMANDS
42 .INDENT 0.0
43 .IP \(bu 2
44 \fI\%merge\fP
45 .IP \(bu 2
46 \fI\%show\fP
47 .UNINDENT
48 .SH MERGE
49 .SS SYNOPSIS
50 .sp
51 \fBllvm\-profdata merge\fP [\fIoptions\fP] [\fIfilename...\fP]
52 .SS DESCRIPTION
53 .sp
54 \fBllvm\-profdata merge\fP takes several profile data files
55 generated by PGO instrumentation and merges them together into a single
56 indexed profile data file.
57 .sp
58 By default profile data is merged without modification. This means that the
59 relative importance of each input file is proportional to the number of samples
60 or counts it contains. In general, the input from a longer training run will be
61 interpreted as relatively more important than a shorter run. Depending on the
62 nature of the training runs it may be useful to adjust the weight given to each
63 input file by using the \fB\-weighted\-input\fP option.
64 .sp
65 Profiles passed in via \fB\-weighted\-input\fP, \fB\-input\-files\fP, or via positional
66 arguments are processed once for each time they are seen.
67 .SS OPTIONS
68 .INDENT 0.0
69 .TP
70 .B \-help
71 Print a summary of command line options.
72 .UNINDENT
73 .INDENT 0.0
74 .TP
75 .B \-output=output, \-o=output
76 Specify the output file name.  \fIOutput\fP cannot be \fB\-\fP as the resulting
77 indexed profile data can\(aqt be written to standard output.
78 .UNINDENT
79 .INDENT 0.0
80 .TP
81 .B \-weighted\-input=weight,filename
82 Specify an input file name along with a weight. The profile counts of the
83 supplied \fBfilename\fP will be scaled (multiplied) by the supplied
84 \fBweight\fP, where where \fBweight\fP is a decimal integer >= 1.
85 Input files specified without using this option are assigned a default
86 weight of 1. Examples are shown below.
87 .UNINDENT
88 .INDENT 0.0
89 .TP
90 .B \-input\-files=path, \-f=path
91 Specify a file which contains a list of files to merge. The entries in this
92 file are newline\-separated. Lines starting with \(aq#\(aq are skipped. Entries may
93 be of the form <filename> or <weight>,<filename>.
94 .UNINDENT
95 .INDENT 0.0
96 .TP
97 .B \-instr (default)
98 Specify that the input profile is an instrumentation\-based profile.
99 .UNINDENT
100 .INDENT 0.0
101 .TP
102 .B \-sample
103 Specify that the input profile is a sample\-based profile.
104 .sp
105 The format of the generated file can be generated in one of three ways:
106 .INDENT 7.0
107 .TP
108 .B \-binary (default)
109 .UNINDENT
110 .sp
111 Emit the profile using a binary encoding. For instrumentation\-based profile
112 the output format is the indexed binary format.
113 .INDENT 7.0
114 .TP
115 .B \-text
116 .UNINDENT
117 .sp
118 Emit the profile in text mode. This option can also be used with both
119 sample\-based and instrumentation\-based profile. When this option is used
120 the profile will be dumped in the text format that is parsable by the profile
121 reader.
122 .INDENT 7.0
123 .TP
124 .B \-gcc
125 .UNINDENT
126 .sp
127 Emit the profile using GCC\(aqs gcov format (Not yet supported).
128 .UNINDENT
129 .INDENT 0.0
130 .TP
131 .B \-sparse[=true|false]
132 Do not emit function records with 0 execution count. Can only be used in
133 conjunction with \-instr. Defaults to false, since it can inhibit compiler
134 optimization during PGO.
135 .UNINDENT
136 .INDENT 0.0
137 .TP
138 .B \-num\-threads=N, \-j=N
139 Use N threads to perform profile merging. When N=0, llvm\-profdata auto\-detects
140 an appropriate number of threads to use. This is the default.
141 .UNINDENT
142 .SS EXAMPLES
143 .SS Basic Usage
144 .sp
145 Merge three profiles:
146 .INDENT 0.0
147 .INDENT 3.5
148 .sp
149 .nf
150 .ft C
151 llvm\-profdata merge foo.profdata bar.profdata baz.profdata \-output merged.profdata
152 .ft P
153 .fi
154 .UNINDENT
155 .UNINDENT
156 .SS Weighted Input
157 .sp
158 The input file \fIfoo.profdata\fP is especially important, multiply its counts by 10:
159 .INDENT 0.0
160 .INDENT 3.5
161 .sp
162 .nf
163 .ft C
164 llvm\-profdata merge \-weighted\-input=10,foo.profdata bar.profdata baz.profdata \-output merged.profdata
165 .ft P
166 .fi
167 .UNINDENT
168 .UNINDENT
169 .sp
170 Exactly equivalent to the previous invocation (explicit form; useful for programmatic invocation):
171 .INDENT 0.0
172 .INDENT 3.5
173 .sp
174 .nf
175 .ft C
176 llvm\-profdata merge \-weighted\-input=10,foo.profdata \-weighted\-input=1,bar.profdata \-weighted\-input=1,baz.profdata \-output merged.profdata
177 .ft P
178 .fi
179 .UNINDENT
180 .UNINDENT
181 .SH SHOW
182 .SS SYNOPSIS
183 .sp
184 \fBllvm\-profdata show\fP [\fIoptions\fP] [\fIfilename\fP]
185 .SS DESCRIPTION
186 .sp
187 \fBllvm\-profdata show\fP takes a profile data file and displays the
188 information about the profile counters for this file and
189 for any of the specified function(s).
190 .sp
191 If \fIfilename\fP is omitted or is \fB\-\fP, then \fBllvm\-profdata show\fP reads its
192 input from standard input.
193 .SS OPTIONS
194 .INDENT 0.0
195 .TP
196 .B \-all\-functions
197 Print details for every function.
198 .UNINDENT
199 .INDENT 0.0
200 .TP
201 .B \-counts
202 Print the counter values for the displayed functions.
203 .UNINDENT
204 .INDENT 0.0
205 .TP
206 .B \-function=string
207 Print details for a function if the function\(aqs name contains the given string.
208 .UNINDENT
209 .INDENT 0.0
210 .TP
211 .B \-help
212 Print a summary of command line options.
213 .UNINDENT
214 .INDENT 0.0
215 .TP
216 .B \-output=output, \-o=output
217 Specify the output file name.  If \fIoutput\fP is \fB\-\fP or it isn\(aqt specified,
218 then the output is sent to standard output.
219 .UNINDENT
220 .INDENT 0.0
221 .TP
222 .B \-instr (default)
223 Specify that the input profile is an instrumentation\-based profile.
224 .UNINDENT
225 .INDENT 0.0
226 .TP
227 .B \-text
228 Instruct the profile dumper to show profile counts in the text format of the
229 instrumentation\-based profile data representation. By default, the profile
230 information is dumped in a more human readable form (also in text) with
231 annotations.
232 .UNINDENT
233 .INDENT 0.0
234 .TP
235 .B \-topn=n
236 Instruct the profile dumper to show the top \fBn\fP functions with the
237 hottest basic blocks in the summary section. By default, the topn functions
238 are not dumped.
239 .UNINDENT
240 .INDENT 0.0
241 .TP
242 .B \-sample
243 Specify that the input profile is a sample\-based profile.
244 .UNINDENT
245 .INDENT 0.0
246 .TP
247 .B \-memop\-sizes
248 Show the profiled sizes of the memory intrinsic calls for shown functions.
249 .UNINDENT
250 .SH EXIT STATUS
251 .sp
252 \fBllvm\-profdata\fP returns 1 if the command is omitted or is invalid,
253 if it cannot read input files, or if there is a mismatch between their data.
254 .SH AUTHOR
255 Maintained by The LLVM Team (http://llvm.org/).
256 .SH COPYRIGHT
257 2003-2018, LLVM Project
258 .\" Generated by docutils manpage writer.
259 .