llvm-project/llvm/test/tools/llvm-profdata
Hongtao Yu ac068e014b [CSSPGO] Consume pseudo-probe-based AutoFDO profile
This change enables pseudo-probe-based sample counts to be consumed by the sample profile loader under the regular `-fprofile-sample-use` switch with minimal adjustments to the existing sample file formats. After the counts are imported, a probe helper, aka, a `PseudoProbeManager` object, is automatically launched to verify the CFG checksum of every function in the current compilation against the corresponding checksum from the profile. Mismatched checksums will cause a function profile to be slipped. A `SampleProfileProber` pass is scheduled before any of the `SampleProfileLoader` instances so that the CFG checksums as well as probe mappings are available during the profile loading time. The `PseudoProbeManager` object is set up right after the profile reading is done. In the future a CFG-based fuzzy matching could be done in `PseudoProbeManager`.

Samples will be applied only to pseudo probe instructions as well as probed callsites once the checksum verification goes through. Those instructions are processed in the same way that regular instructions would be processed in the line-number-based scenario. In other words, a function is processed in a regular way as if it was reduced to just containing pseudo probes (block probes and callsites).

**Adjustment to profile format **

A CFG checksum field is being added to the existing AutoFDO profile formats. So far only the text format and the extended binary format are supported. For the text format, a new line like
```
!CFGChecksum: 12345
```
is added to the end of the body sample lines. For the extended binary profile format, we introduce a metadata section to store the checksum map from function names to their CFG checksums.

Differential Revision: https://reviews.llvm.org/D92347
2020-12-16 15:57:18 -08:00
..
Inputs [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
c-general.test
compact-sample.proftext [llvm-profdata]Fix llvm-profdata crash on compact binary profile 2020-09-20 16:58:34 -07:00
compat.proftext
count-mismatch.proftext
csprof-dump.test
cutoff.test
gcc-gcov-sample-profile.test
general.proftext
hash-mismatch.proftext
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-probe-profile.test [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
merge_empty_profile.test
multiple-inputs.test
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
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
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-overlap.test [llvm-profdata] Implement llvm-profdata overlap for sample profiles 2020-08-08 17:49:48 -07:00
sample-profile-basic.test
sample-remap.test
sample-summary.test
show-instr-level.test
show-prof-info.test [SampleFDO] Store fixed length MD5 in NameTable instead of using ULEB128 if 2020-12-08 16:21:01 -08: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
weight-instr.test
weight-sample.test