mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Merge llvm-project main llvmorg-12-init-17869-g8e464dd76bef This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12-init-17869-g8e464dd76bef, the last commit before the upstream release/12.x branch was created. PR: 255570 (cherry picked from commite8d8bef961) Merge llvm-project 12.0.0 release This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12.0.0-0-gd28af7c654d8, a.k.a. 12.0.0 release. PR: 255570 (cherry picked from commitd409305fa3) Disable strict-fp for powerpcspe, as it does not work properly yet Merge commit 5c18d1136665 from llvm git (by Qiu Chaofan) [SPE] Disable strict-fp for SPE by default As discussed in PR50385, strict-fp on PowerPC SPE has not been handled well. This patch disables it by default for SPE. Reviewed By: nemanjai, vit9696, jhibbits Differential Revision: https://reviews.llvm.org/D103235 PR: 255570 (cherry picked from commit715df83abc) Apply upstream libc++ fix to allow building with devel/xxx-xtoolchain-gcc Merge commit 52e9d80d5db2 from llvm git (by Jason Liu): [libc++] add `inline` for __open's definition in ifstream and ofstream Summary: When building with gcc on AIX, it seems that gcc does not like the `always_inline` without the `inline` keyword. So adding the inline keywords in for __open in ifstream and ofstream. That will also make it consistent with __open in basic_filebuf (it seems we added `inline` there before for gcc build as well). Differential Revision: https://reviews.llvm.org/D99422 PR: 255570 (cherry picked from commitd099db2546) Undefine HAVE_(DE)REGISTER_FRAME in llvm's config.h on arm Otherwise, the lli tool (enable by WITH_CLANG_EXTRAS) won't link on arm, stating that __register_frame is undefined. This function is normally provided by libunwind, but explicitly not for the ARM Exception ABI. Reported by: oh PR: 255570 (cherry picked from commitf336b45e94) Merge llvm-project 12.0.1 rc2 This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12.0.1-rc2-0-ge7dac564cd0e, a.k.a. 12.0.1 rc2. PR: 255570 (cherry picked from commit23408297fb) Revert libunwind change to fix backtrace segfault on aarch64 Revert commit 22b615a96593 from llvm git (by Daniel Kiss): [libunwind] Support for leaf function unwinding. Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the support for the DW_CFA_undefined because it marks the end of the frames. Ryan Prichard provided code for the tests. Reviewed By: #libunwind, mstorsjo Differential Revision: https://reviews.llvm.org/D83573 Reland with limit the test to the x86_64-linux target. Bisection has shown that this particular upstream commit causes programs using backtrace(3) on aarch64 to segfault. This affects the lang/rust port, for instance. Until we can upstream to fix this problem, revert the commit for now. Reported by: mikael PR: 256864 (cherry picked from commit5866c369e4) Merge llvm-project 12.0.1 release This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp to llvmorg-12.0.1-0-gfed41342a82f, a.k.a. 12.0.1 release. PR: 255570 (cherry picked from commit4652422eb4) compilert-rt: build out-of-line LSE atomics helpers for aarch64 Both clang >= 12 and gcc >= 10.1 now default to -moutline-atomics for aarch64. This requires a bunch of helper functions in libcompiler_rt.a, to avoid link errors like "undefined symbol: __aarch64_ldadd8_acq_rel". (Note: of course you can use -mno-outline-atomics as a workaround too, but this would negate the potential performance benefit of the faster LSE instructions.) Bump __FreeBSD_version so ports maintainers can easily detect this. PR: 257392 (cherry picked from commitcc55ee8009)
432 lines
13 KiB
Groff
432 lines
13 KiB
Groff
.\" $FreeBSD$
|
|
.\" Man page generated from reStructuredText.
|
|
.
|
|
.
|
|
.nr rst2man-indent-level 0
|
|
.
|
|
.de1 rstReportMargin
|
|
\\$1 \\n[an-margin]
|
|
level \\n[rst2man-indent-level]
|
|
level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
-
|
|
\\n[rst2man-indent0]
|
|
\\n[rst2man-indent1]
|
|
\\n[rst2man-indent2]
|
|
..
|
|
.de1 INDENT
|
|
.\" .rstReportMargin pre:
|
|
. RS \\$1
|
|
. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
|
|
. nr rst2man-indent-level +1
|
|
.\" .rstReportMargin post:
|
|
..
|
|
.de UNINDENT
|
|
. RE
|
|
.\" indent \\n[an-margin]
|
|
.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
.nr rst2man-indent-level -1
|
|
.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
|
|
.in \\n[rst2man-indent\\n[rst2man-indent-level]]u
|
|
..
|
|
.TH "LLVM-PROFDATA" "1" "2021-06-07" "12" "LLVM"
|
|
.SH NAME
|
|
llvm-profdata \- Profile data tool
|
|
.SH SYNOPSIS
|
|
.sp
|
|
\fBllvm\-profdata\fP \fIcommand\fP [\fIargs...\fP]
|
|
.SH DESCRIPTION
|
|
.sp
|
|
The \fBllvm\-profdata\fP tool is a small utility for working with profile
|
|
data files.
|
|
.SH COMMANDS
|
|
.INDENT 0.0
|
|
.IP \(bu 2
|
|
\fI\%merge\fP
|
|
.IP \(bu 2
|
|
\fI\%show\fP
|
|
.IP \(bu 2
|
|
\fI\%overlap\fP
|
|
.UNINDENT
|
|
.SH MERGE
|
|
.SS SYNOPSIS
|
|
.sp
|
|
\fBllvm\-profdata merge\fP [\fIoptions\fP] [\fIfilename...\fP]
|
|
.SS DESCRIPTION
|
|
.sp
|
|
\fBllvm\-profdata merge\fP takes several profile data files
|
|
generated by PGO instrumentation and merges them together into a single
|
|
indexed profile data file.
|
|
.sp
|
|
By default profile data is merged without modification. This means that the
|
|
relative importance of each input file is proportional to the number of samples
|
|
or counts it contains. In general, the input from a longer training run will be
|
|
interpreted as relatively more important than a shorter run. Depending on the
|
|
nature of the training runs it may be useful to adjust the weight given to each
|
|
input file by using the \fB\-weighted\-input\fP option.
|
|
.sp
|
|
Profiles passed in via \fB\-weighted\-input\fP, \fB\-input\-files\fP, or via positional
|
|
arguments are processed once for each time they are seen.
|
|
.SS OPTIONS
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-help
|
|
Print a summary of command line options.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-output=output, \-o=output
|
|
Specify the output file name. \fIOutput\fP cannot be \fB\-\fP as the resulting
|
|
indexed profile data can\(aqt be written to standard output.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-weighted\-input=weight,filename
|
|
Specify an input file name along with a weight. The profile counts of the
|
|
supplied \fBfilename\fP will be scaled (multiplied) by the supplied
|
|
\fBweight\fP, where \fBweight\fP is a decimal integer >= 1.
|
|
Input files specified without using this option are assigned a default
|
|
weight of 1. Examples are shown below.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-input\-files=path, \-f=path
|
|
Specify a file which contains a list of files to merge. The entries in this
|
|
file are newline\-separated. Lines starting with \(aq#\(aq are skipped. Entries may
|
|
be of the form <filename> or <weight>,<filename>.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-remapping\-file=path, \-r=path
|
|
Specify a file which contains a remapping from symbol names in the input
|
|
profile to the symbol names that should be used in the output profile. The
|
|
file should consist of lines of the form \fB<input\-symbol> <output\-symbol>\fP\&.
|
|
Blank lines and lines starting with \fB#\fP are skipped.
|
|
.sp
|
|
The llvm\-cxxmap tool can be used to generate the symbol
|
|
remapping file.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-instr (default)
|
|
Specify that the input profile is an instrumentation\-based profile.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-sample
|
|
Specify that the input profile is a sample\-based profile.
|
|
.sp
|
|
The format of the generated file can be generated in one of three ways:
|
|
.INDENT 7.0
|
|
.TP
|
|
.B \-binary (default)
|
|
.UNINDENT
|
|
.sp
|
|
Emit the profile using a binary encoding. For instrumentation\-based profile
|
|
the output format is the indexed binary format.
|
|
.INDENT 7.0
|
|
.TP
|
|
.B \-extbinary
|
|
.UNINDENT
|
|
.sp
|
|
Emit the profile using an extensible binary encoding. This option can only
|
|
be used with sample\-based profile. The extensible binary encoding can be
|
|
more compact with compression enabled and can be loaded faster than the
|
|
default binary encoding.
|
|
.INDENT 7.0
|
|
.TP
|
|
.B \-text
|
|
.UNINDENT
|
|
.sp
|
|
Emit the profile in text mode. This option can also be used with both
|
|
sample\-based and instrumentation\-based profile. When this option is used
|
|
the profile will be dumped in the text format that is parsable by the profile
|
|
reader.
|
|
.INDENT 7.0
|
|
.TP
|
|
.B \-gcc
|
|
.UNINDENT
|
|
.sp
|
|
Emit the profile using GCC\(aqs gcov format (Not yet supported).
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-sparse[=true|false]
|
|
Do not emit function records with 0 execution count. Can only be used in
|
|
conjunction with \-instr. Defaults to false, since it can inhibit compiler
|
|
optimization during PGO.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-num\-threads=N, \-j=N
|
|
Use N threads to perform profile merging. When N=0, llvm\-profdata auto\-detects
|
|
an appropriate number of threads to use. This is the default.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-failure\-mode=[any|all]
|
|
Set the failure mode. There are two options: \(aqany\(aq causes the merge command to
|
|
fail if any profiles are invalid, and \(aqall\(aq causes the merge command to fail
|
|
only if all profiles are invalid. If \(aqall\(aq is set, information from any
|
|
invalid profiles is excluded from the final merged product. The default
|
|
failure mode is \(aqany\(aq.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-prof\-sym\-list=path
|
|
Specify a file which contains a list of symbols to generate profile symbol
|
|
list in the profile. This option can only be used with sample\-based profile
|
|
in extbinary format. The entries in this file are newline\-separated.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-compress\-all\-sections=[true|false]
|
|
Compress all sections when writing the profile. This option can only be used
|
|
with sample\-based profile in extbinary format.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-use\-md5=[true|false]
|
|
Use MD5 to represent string in name table when writing the profile.
|
|
This option can only be used with sample\-based profile in extbinary format.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-gen\-partial\-profile=[true|false]
|
|
Mark the profile to be a partial profile which only provides partial profile
|
|
coverage for the optimized target. This option can only be used with
|
|
sample\-based profile in extbinary format.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-supplement\-instr\-with\-sample=path_to_sample_profile
|
|
Supplement an instrumentation profile with sample profile. The sample profile
|
|
is the input of the flag. Output will be in instrumentation format (only works
|
|
with \-instr).
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-zero\-counter\-threshold=threshold_float_number
|
|
For the function which is cold in instr profile but hot in sample profile, if
|
|
the ratio of the number of zero counters divided by the the total number of
|
|
counters is above the threshold, the profile of the function will be regarded
|
|
as being harmful for performance and will be dropped.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-instr\-prof\-cold\-threshold=threshold_int_number
|
|
User specified cold threshold for instr profile which will override the cold
|
|
threshold got from profile summary.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-suppl\-min\-size\-threshold=threshold_int_number
|
|
If the size of a function is smaller than the threshold, assume it can be
|
|
inlined by PGO early inliner and it will not be adjusted based on sample
|
|
profile.
|
|
.UNINDENT
|
|
.SS EXAMPLES
|
|
.SS Basic Usage
|
|
.sp
|
|
Merge three profiles:
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
llvm\-profdata merge foo.profdata bar.profdata baz.profdata \-output merged.profdata
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SS Weighted Input
|
|
.sp
|
|
The input file \fIfoo.profdata\fP is especially important, multiply its counts by 10:
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
llvm\-profdata merge \-weighted\-input=10,foo.profdata bar.profdata baz.profdata \-output merged.profdata
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.sp
|
|
Exactly equivalent to the previous invocation (explicit form; useful for programmatic invocation):
|
|
.INDENT 0.0
|
|
.INDENT 3.5
|
|
.sp
|
|
.nf
|
|
.ft C
|
|
llvm\-profdata merge \-weighted\-input=10,foo.profdata \-weighted\-input=1,bar.profdata \-weighted\-input=1,baz.profdata \-output merged.profdata
|
|
.ft P
|
|
.fi
|
|
.UNINDENT
|
|
.UNINDENT
|
|
.SH SHOW
|
|
.SS SYNOPSIS
|
|
.sp
|
|
\fBllvm\-profdata show\fP [\fIoptions\fP] [\fIfilename\fP]
|
|
.SS DESCRIPTION
|
|
.sp
|
|
\fBllvm\-profdata show\fP takes a profile data file and displays the
|
|
information about the profile counters for this file and
|
|
for any of the specified function(s).
|
|
.sp
|
|
If \fIfilename\fP is omitted or is \fB\-\fP, then \fBllvm\-profdata show\fP reads its
|
|
input from standard input.
|
|
.SS OPTIONS
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-all\-functions
|
|
Print details for every function.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-counts
|
|
Print the counter values for the displayed functions.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-function=string
|
|
Print details for a function if the function\(aqs name contains the given string.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-help
|
|
Print a summary of command line options.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-output=output, \-o=output
|
|
Specify the output file name. If \fIoutput\fP is \fB\-\fP or it isn\(aqt specified,
|
|
then the output is sent to standard output.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-instr (default)
|
|
Specify that the input profile is an instrumentation\-based profile.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-text
|
|
Instruct the profile dumper to show profile counts in the text format of the
|
|
instrumentation\-based profile data representation. By default, the profile
|
|
information is dumped in a more human readable form (also in text) with
|
|
annotations.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-topn=n
|
|
Instruct the profile dumper to show the top \fBn\fP functions with the
|
|
hottest basic blocks in the summary section. By default, the topn functions
|
|
are not dumped.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-sample
|
|
Specify that the input profile is a sample\-based profile.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-memop\-sizes
|
|
Show the profiled sizes of the memory intrinsic calls for shown functions.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-value\-cutoff=n
|
|
Show only those functions whose max count values are greater or equal to \fBn\fP\&.
|
|
By default, the value\-cutoff is set to 0.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-list\-below\-cutoff
|
|
Only output names of functions whose max count value are below the cutoff
|
|
value.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-showcs
|
|
Only show context sensitive profile counts. The default is to filter all
|
|
context sensitive profile counts.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-show\-prof\-sym\-list=[true|false]
|
|
Show profile symbol list if it exists in the profile. This option is only
|
|
meaningful for sample\-based profile in extbinary format.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-show\-sec\-info\-only=[true|false]
|
|
Show basic information about each section in the profile. This option is
|
|
only meaningful for sample\-based profile in extbinary format.
|
|
.UNINDENT
|
|
.SH OVERLAP
|
|
.SS SYNOPSIS
|
|
.sp
|
|
\fBllvm\-profdata overlap\fP [\fIoptions\fP] [\fIbase profile file\fP] [\fItest profile file\fP]
|
|
.SS DESCRIPTION
|
|
.sp
|
|
\fBllvm\-profdata overlap\fP takes two profile data files and displays the
|
|
\fIoverlap\fP of counter distribution between the whole files and between any of the
|
|
specified functions.
|
|
.sp
|
|
In this command, \fIoverlap\fP is defined as follows:
|
|
Suppose \fIbase profile file\fP has the following counts:
|
|
{c1_1, c1_2, ..., c1_n, c1_u_1, c2_u_2, ..., c2_u_s},
|
|
and \fItest profile file\fP has
|
|
{c2_1, c2_2, ..., c2_n, c2_v_1, c2_v_2, ..., c2_v_t}.
|
|
Here c{1|2}_i (i = 1 .. n) are matched counters and c1_u_i (i = 1 .. s) and
|
|
c2_v_i (i = 1 .. v) are unmatched counters (or counters only existing in)
|
|
\fIbase profile file\fP and \fItest profile file\fP, respectively.
|
|
Let sum_1 = c1_1 + c1_2 + ... + c1_n + c1_u_1 + c2_u_2 + ... + c2_u_s, and
|
|
sum_2 = c2_1 + c2_2 + ... + c2_n + c2_v_1 + c2_v_2 + ... + c2_v_t.
|
|
\fIoverlap\fP = min(c1_1/sum_1, c2_1/sum_2) + min(c1_2/sum_1, c2_2/sum_2) + ...
|
|
+ min(c1_n/sum_1, c2_n/sum_2).
|
|
.sp
|
|
The result overlap distribution is a percentage number, ranging from 0.0% to
|
|
100.0%, where 0.0% means there is no overlap and 100.0% means a perfect
|
|
overlap.
|
|
.sp
|
|
Here is an example, if \fIbase profile file\fP has counts of {400, 600}, and
|
|
\fItest profile file\fP has matched counts of {60000, 40000}. The \fIoverlap\fP is 80%.
|
|
.SS OPTIONS
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-function=string
|
|
Print details for a function if the function\(aqs name contains the given string.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-help
|
|
Print a summary of command line options.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-o=output or \-o output
|
|
Specify the output file name. If \fIoutput\fP is \fB\-\fP or it isn\(aqt specified,
|
|
then the output is sent to standard output.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-value\-cutoff=n
|
|
Show only those functions whose max count values are greater or equal to \fBn\fP\&.
|
|
By default, the value\-cutoff is set to max of unsigned long long.
|
|
.UNINDENT
|
|
.INDENT 0.0
|
|
.TP
|
|
.B \-cs
|
|
Only show overlap for the context sensitive profile counts. The default is to show
|
|
non\-context sensitive profile counts.
|
|
.UNINDENT
|
|
.SH EXIT STATUS
|
|
.sp
|
|
\fBllvm\-profdata\fP returns 1 if the command is omitted or is invalid,
|
|
if it cannot read input files, or if there is a mismatch between their data.
|
|
.SH AUTHOR
|
|
Maintained by the LLVM Team (https://llvm.org/).
|
|
.SH COPYRIGHT
|
|
2003-2021, LLVM Project
|
|
.\" Generated by docutils manpage writer.
|
|
.
|