llvm-project/llvm/test/tools/llvm-profdata
Wei Mi a23f62343c Supplement instr profile with sample profile.
PGO profile is usually more precise than sample profile. However, PGO profile
needs to be collected from loadtest and loadtest may not be representative
enough to the production workload. Sample profile collected from production
can be used as a supplement -- for functions cold in loadtest but warm/hot
in production, we can scale up the related function in PGO profile if the
function is warm or hot in sample profile.

The implementation contains changes in compiler side and llvm-profdata side.
Given an instr profile and a sample profile, for a function cold in PGO
profile but warm/hot in sample profile, llvm-profdata will either mark
all the counters in the profile to be -1 or scale up the max count in the
function to be above hot threshold, depending on the zero counter ratio in
the profile. The assumption is if there are too many counters being zero
in the function profile, the profile is more likely to cause harm than good,
then llvm-profdata will mark all the counters to be -1 indicating the
function is hot but the profile is unaccountable. In compiler side, if a
function profile with all -1 counters is seen, the function entry count will
be set to be above hot threshold but its internal profile will be dropped.

In the long run, it may be useful to let compiler support using PGO profile
and sample profile at the same time, but that requires more careful design
and more substantial changes to make two profiles work seamlessly. The patch
here serves as a simple intermediate solution.

Differential Revision: https://reviews.llvm.org/D81981
2020-07-27 20:17:40 -07:00
..
Inputs Supplement instr profile with sample profile. 2020-07-27 20:17:40 -07:00
c-general.test [tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI. 2020-04-17 12:35:25 +03:00
compact-sample.proftext
compat.proftext
count-mismatch.proftext
csprof-dump.test
cutoff.test [tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI. 2020-04-17 12:35:25 +03:00
gcc-gcov-sample-profile.test [gcov] Delete XFAIL: host-byteorder-big-endian 2020-06-03 19:58:28 -07:00
general.proftext [llvm-profdata] Support -detailed-summary for Sample Profile 2020-05-05 18:28:22 -07:00
hash-mismatch.proftext [tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI. 2020-04-17 12:35:25 +03:00
header-directives.test [PGO] Supporting code for always instrumenting entry block 2020-07-22 15:01:53 -07:00
inline-samples.test
input-dir.test
input-filenames.test
instr-remap.test
invalid-profdata.test
lit.local.cfg
malformed-ptr-to-counter-array.test
memop-size-prof.proftext
merge_empty_profile.test
multiple-inputs.test [tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI. 2020-04-17 12:35:25 +03:00
multiple-profdata-merge.test
nocompress.test
overflow-instr.test Supplement instr profile with sample profile. 2020-07-27 20:17:40 -07:00
overflow-sample.test
overlap.test [tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI. 2020-04-17 12:35:25 +03:00
overlap_cs.test
overlap_vp.test
profile-symbol-list-compress.test
profile-symbol-list.test
raw-32-bits-be.test
raw-32-bits-le.test
raw-64-bits-be.test
raw-64-bits-le.test
raw-magic-but-no-header.test
raw-two-profiles.test
roundtrip-compress.test
roundtrip.test Fix the roundtrip test under llvm-profdata 2020-06-05 08:52:21 -07:00
same-filename.test
sample-hot-func-list.test [llvm-profdata] --hot-func-list: fix some style issues in D81800 2020-06-24 15:17:03 -07:00
sample-profile-basic.test
sample-remap.test
sample-summary.test [llvm-profdata] Support -detailed-summary for Sample Profile 2020-05-05 18:28:22 -07:00
show-instr-level.test
show-prof-info.test [SampleFDO] Rename llvm-profdata flag -partial-profile to -gen-partial-profile. 2020-05-12 15:06:03 -07:00
suppl-instr-with-sample.test Supplement instr profile with sample profile. 2020-07-27 20:17:40 -07:00
text-dump.test
text-format-errors.test
threaded-count-mismatch.test
value-prof.proftext [tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI. 2020-04-17 12:35:25 +03:00
weight-instr.test [tools][tests] - Use --check-prefixes instead of multiple --check-prefix. NFCI. 2020-04-17 12:35:25 +03:00
weight-sample.test