]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.bin/clang/llvm-profdata/llvm-profdata.1
Merge llvm, clang, lld, lldb, compiler-rt and libc++ r304222, and update
[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" "2016-03-03" "3.8" "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 .SS OPTIONS
65 .INDENT 0.0
66 .TP
67 .B \-help
68 Print a summary of command line options.
69 .UNINDENT
70 .INDENT 0.0
71 .TP
72 .B \-output=output, \-o=output
73 Specify the output file name.  \fIOutput\fP cannot be \fB\-\fP as the resulting
74 indexed profile data can\(aqt be written to standard output.
75 .UNINDENT
76 .INDENT 0.0
77 .TP
78 .B \-weighted\-input=weight,filename
79 Specify an input file name along with a weight. The profile counts of the input
80 file will be scaled (multiplied) by the supplied \fBweight\fP, where where \fBweight\fP
81 is a decimal integer >= 1. Input files specified without using this option are
82 assigned a default weight of 1. Examples are shown below.
83 .UNINDENT
84 .INDENT 0.0
85 .TP
86 .B \-instr (default)
87 Specify that the input profile is an instrumentation\-based profile.
88 .UNINDENT
89 .INDENT 0.0
90 .TP
91 .B \-sample
92 Specify that the input profile is a sample\-based profile.
93 .sp
94 The format of the generated file can be generated in one of three ways:
95 .INDENT 7.0
96 .TP
97 .B \-binary (default)
98 .UNINDENT
99 .sp
100 Emit the profile using a binary encoding. For instrumentation\-based profile
101 the output format is the indexed binary format.
102 .INDENT 7.0
103 .TP
104 .B \-text
105 .UNINDENT
106 .sp
107 Emit the profile in text mode. This option can also be used with both
108 sample\-based and instrumentation\-based profile. When this option is used
109 the profile will be dumped in the text format that is parsable by the profile
110 reader.
111 .INDENT 7.0
112 .TP
113 .B \-gcc
114 .UNINDENT
115 .sp
116 Emit the profile using GCC\(aqs gcov format (Not yet supported).
117 .UNINDENT
118 .SS EXAMPLES
119 .SS Basic Usage
120 .sp
121 Merge three profiles:
122 .INDENT 0.0
123 .INDENT 3.5
124 .sp
125 .nf
126 .ft C
127 llvm\-profdata merge foo.profdata bar.profdata baz.profdata \-output merged.profdata
128 .ft P
129 .fi
130 .UNINDENT
131 .UNINDENT
132 .SS Weighted Input
133 .sp
134 The input file \fIfoo.profdata\fP is especially important, multiply its counts by 10:
135 .INDENT 0.0
136 .INDENT 3.5
137 .sp
138 .nf
139 .ft C
140 llvm\-profdata merge \-weighted\-input=10,foo.profdata bar.profdata baz.profdata \-output merged.profdata
141 .ft P
142 .fi
143 .UNINDENT
144 .UNINDENT
145 .sp
146 Exactly equivalent to the previous invocation (explicit form; useful for programmatic invocation):
147 .INDENT 0.0
148 .INDENT 3.5
149 .sp
150 .nf
151 .ft C
152 llvm\-profdata merge \-weighted\-input=10,foo.profdata \-weighted\-input=1,bar.profdata \-weighted\-input=1,baz.profdata \-output merged.profdata
153 .ft P
154 .fi
155 .UNINDENT
156 .UNINDENT
157 .SH SHOW
158 .SS SYNOPSIS
159 .sp
160 \fBllvm\-profdata show\fP [\fIoptions\fP] [\fIfilename\fP]
161 .SS DESCRIPTION
162 .sp
163 \fBllvm\-profdata show\fP takes a profile data file and displays the
164 information about the profile counters for this file and
165 for any of the specified function(s).
166 .sp
167 If \fIfilename\fP is omitted or is \fB\-\fP, then \fBllvm\-profdata show\fP reads its
168 input from standard input.
169 .SS OPTIONS
170 .INDENT 0.0
171 .TP
172 .B \-all\-functions
173 Print details for every function.
174 .UNINDENT
175 .INDENT 0.0
176 .TP
177 .B \-counts
178 Print the counter values for the displayed functions.
179 .UNINDENT
180 .INDENT 0.0
181 .TP
182 .B \-function=string
183 Print details for a function if the function\(aqs name contains the given string.
184 .UNINDENT
185 .INDENT 0.0
186 .TP
187 .B \-help
188 Print a summary of command line options.
189 .UNINDENT
190 .INDENT 0.0
191 .TP
192 .B \-output=output, \-o=output
193 Specify the output file name.  If \fIoutput\fP is \fB\-\fP or it isn\(aqt specified,
194 then the output is sent to standard output.
195 .UNINDENT
196 .INDENT 0.0
197 .TP
198 .B \-instr (default)
199 Specify that the input profile is an instrumentation\-based profile.
200 .UNINDENT
201 .INDENT 0.0
202 .TP
203 .B \-text
204 Instruct the profile dumper to show profile counts in the text format of the
205 instrumentation\-based profile data representation. By default, the profile
206 information is dumped in a more human readable form (also in text) with
207 annotations.
208 .UNINDENT
209 .INDENT 0.0
210 .TP
211 .B \-sample
212 Specify that the input profile is a sample\-based profile.
213 .UNINDENT
214 .SH EXIT STATUS
215 .sp
216 \fBllvm\-profdata\fP returns 1 if the command is omitted or is invalid,
217 if it cannot read input files, or if there is a mismatch between their data.
218 .SH AUTHOR
219 Maintained by The LLVM Team (http://llvm.org/).
220 .SH COPYRIGHT
221 2003-2016, LLVM Project
222 .\" Generated by docutils manpage writer.
223 .