1LLVM-PROFDATA(1)                     LLVM                     LLVM-PROFDATA(1)
2
3
4

NAME

6       llvm-profdata - Profile data tool
7

SYNOPSIS

9       llvm-profdata command [args...]
10

DESCRIPTION

12       The llvm-profdata tool is a small utility for working with profile data
13       files.
14

COMMANDS

16       · merge
17
18       · show
19

MERGE

21   SYNOPSIS
22       llvm-profdata merge [options] [filename...]
23
24   DESCRIPTION
25       llvm-profdata merge takes several profile data files generated  by  PGO
26       instrumentation  and merges them together into a single indexed profile
27       data file.
28
29       By default profile data is merged without modification. This means that
30       the  relative importance of each input file is proportional to the num‐
31       ber of samples or counts it contains. In  general,  the  input  from  a
32       longer  training  run  will be interpreted as relatively more important
33       than a shorter run. Depending on the nature of the training runs it may
34       be  useful  to  adjust the weight given to each input file by using the
35       -weighted-input option.
36
37       Profiles passed in via -weighted-input, -input-files, or via positional
38       arguments are processed once for each time they are seen.
39
40   OPTIONS
41       -help  Print a summary of command line options.
42
43       -output=output, -o=output
44              Specify the output file name.  Output cannot be - as the result‐
45              ing indexed profile data can't be written to standard output.
46
47       -weighted-input=weight,filename
48              Specify an input file name along  with  a  weight.  The  profile
49              counts  of  the supplied filename will be scaled (multiplied) by
50              the supplied weight, where where weight is a decimal integer  >=
51              1.  Input files specified without using this option are assigned
52              a default weight of 1. Examples are shown below.
53
54       -input-files=path, -f=path
55              Specify a file which contains a list  of  files  to  merge.  The
56              entries  in this file are newline-separated. Lines starting with
57              '#' are skipped. Entries  may  be  of  the  form  <filename>  or
58              <weight>,<filename>.
59
60       -instr (default)
61              Specify  that the input profile is an instrumentation-based pro‐
62              file.
63
64       -sample
65              Specify that the input profile is a sample-based profile.
66
67              The format of the generated file can  be  generated  in  one  of
68              three ways:
69
70              -binary (default)
71
72              Emit  the  profile  using  a  binary  encoding. For instrumenta‐
73              tion-based profile the output format is the indexed binary  for‐
74              mat.
75
76              -text
77
78              Emit the profile in text mode. This option can also be used with
79              both sample-based and instrumentation-based profile.  When  this
80              option  is  used  the  profile will be dumped in the text format
81              that is parsable by the profile reader.
82
83              -gcc
84
85              Emit the profile using GCC's gcov format (Not yet supported).
86
87       -sparse[=true|false]
88              Do not emit function records with 0 execution count. Can only be
89              used in conjunction with -instr. Defaults to false, since it can
90              inhibit compiler optimization during PGO.
91
92   EXAMPLES
93   Basic Usage
94       Merge three profiles:
95
96          llvm-profdata merge foo.profdata bar.profdata baz.profdata -output merged.profdata
97
98   Weighted Input
99       The input file  foo.profdata  is  especially  important,  multiply  its
100       counts by 10:
101
102          llvm-profdata merge -weighted-input=10,foo.profdata bar.profdata baz.profdata -output merged.profdata
103
104       Exactly  equivalent  to  the previous invocation (explicit form; useful
105       for programmatic invocation):
106
107          llvm-profdata merge -weighted-input=10,foo.profdata -weighted-input=1,bar.profdata -weighted-input=1,baz.profdata -output merged.profdata
108

SHOW

110   SYNOPSIS
111       llvm-profdata show [options] [filename]
112
113   DESCRIPTION
114       llvm-profdata show takes a profile data file and displays the  informa‐
115       tion about the profile counters for this file and for any of the speci‐
116       fied function(s).
117
118       If filename is omitted or is -, then llvm-profdata show reads its input
119       from standard input.
120
121   OPTIONS
122       -all-functions
123              Print details for every function.
124
125       -counts
126              Print the counter values for the displayed functions.
127
128       -function=string
129              Print details for a function if the function's name contains the
130              given string.
131
132       -help  Print a summary of command line options.
133
134       -output=output, -o=output
135              Specify the output file name.  If output is - or it isn't speci‐
136              fied, then the output is sent to standard output.
137
138       -instr (default)
139              Specify  that the input profile is an instrumentation-based pro‐
140              file.
141
142       -text  Instruct the profile dumper to show profile counts in  the  text
143              format of the instrumentation-based profile data representation.
144              By default, the profile information is dumped in  a  more  human
145              readable form (also in text) with annotations.
146
147       -sample
148              Specify that the input profile is a sample-based profile.
149

EXIT STATUS

151       llvm-profdata  returns 1 if the command is omitted or is invalid, if it
152       cannot read input files, or if there is a mismatch between their data.
153

AUTHOR

155       Maintained by The LLVM Team (http://llvm.org/).
156
158       2003-2019, LLVM Project
159
160
161
162
1633.9                               2019-02-01                  LLVM-PROFDATA(1)
Impressum