llvm-project/llvm/test/tools/llvm-profdata
weihe 540489de68 [llvm-profdata] Implement llvm-profdata overlap for sample profiles
Implemented the `llvm-profdata overlap` feature for sample profiles. It reports weighted //similarity// and unweighted //overlap// metrics at program and function level for two input profiles. Similarity metrics are symmetric with regards to the order of two input profiles. By default, the tool only reports program-level summary. Users can look into function-level details via additional options `--function`, `--similarity-cutoff`, and `--value-cutoff`.

The similarity metrics are designed as follows:
* Program-level summary
    * Whole program profile similarity is an aggregate over function-level similarity `FS`: `PS = sum(FS(A) * avg_weight(A))` for all function `A`.
    * Whole program sample overlap: `PSO = common_samples / total_samples`.
    * Function overlap: `FO = #common_function / #total_function`.
    * Hot-function overlap: `HFO = #common_hot_function / #total_hot_function`.
    * Hot-block overlap: `HBO = #common_hot_block / #total_hot_block`.
* Function-level details
    * Function-level similarity is an aggregate over line/block-level similarities `BS` of all sample lines/blocks in the function, weighted by the closeness of the function's weights in two profiles: `FS = sum(BS(i)) * (1 - weight_distance(A))`.
    * Function-level sample overlap: `FSO = common_samples / total_samples` for samples in the function.

Reviewed By: wenlei, hoyFB, wmi

Differential Revision: https://reviews.llvm.org/D83852
2020-08-08 17:49:48 -07:00
..
Inputs [llvm-profdata] Implement llvm-profdata overlap for sample profiles 2020-08-08 17:49:48 -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-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 [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