2 .\" Man page generated from reStructuredText.
4 .TH "LLVM-PROFDATA" "1" "2018-08-02" "7" "LLVM"
6 llvm-profdata \- Profile data tool
8 .nr rst2man-indent-level 0
12 level \\n[rst2man-indent-level]
13 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
20 .\" .rstReportMargin pre:
22 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
23 . nr rst2man-indent-level +1
24 .\" .rstReportMargin post:
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
36 \fBllvm\-profdata\fP \fIcommand\fP [\fIargs...\fP]
39 The \fBllvm\-profdata\fP tool is a small utility for working with profile
51 \fBllvm\-profdata merge\fP [\fIoptions\fP] [\fIfilename...\fP]
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.
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.
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.
71 Print a summary of command line options.
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.
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.
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>.
98 Specify that the input profile is an instrumentation\-based profile.
103 Specify that the input profile is a sample\-based profile.
105 The format of the generated file can be generated in one of three ways:
108 .B \-binary (default)
111 Emit the profile using a binary encoding. For instrumentation\-based profile
112 the output format is the indexed binary format.
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
127 Emit the profile using GCC\(aqs gcov format (Not yet supported).
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.
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.
145 Merge three profiles:
151 llvm\-profdata merge foo.profdata bar.profdata baz.profdata \-output merged.profdata
158 The input file \fIfoo.profdata\fP is especially important, multiply its counts by 10:
164 llvm\-profdata merge \-weighted\-input=10,foo.profdata bar.profdata baz.profdata \-output merged.profdata
170 Exactly equivalent to the previous invocation (explicit form; useful for programmatic invocation):
176 llvm\-profdata merge \-weighted\-input=10,foo.profdata \-weighted\-input=1,bar.profdata \-weighted\-input=1,baz.profdata \-output merged.profdata
184 \fBllvm\-profdata show\fP [\fIoptions\fP] [\fIfilename\fP]
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).
191 If \fIfilename\fP is omitted or is \fB\-\fP, then \fBllvm\-profdata show\fP reads its
192 input from standard input.
197 Print details for every function.
202 Print the counter values for the displayed functions.
207 Print details for a function if the function\(aqs name contains the given string.
212 Print a summary of command line options.
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.
223 Specify that the input profile is an instrumentation\-based profile.
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
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
243 Specify that the input profile is a sample\-based profile.
248 Show the profiled sizes of the memory intrinsic calls for shown functions.
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.
255 Maintained by The LLVM Team (http://llvm.org/).
257 2003-2018, LLVM Project
258 .\" Generated by docutils manpage writer.