forked from OSchip/llvm-project
![]() 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 |
||
---|---|---|
.. | ||
CSIR_profile.proftext | ||
IR_profile.proftext | ||
bad-hash.proftext | ||
bar3-1.proftext | ||
basic.proftext | ||
c-general.profraw | ||
clang_profile.proftext | ||
compat-sample.profdata | ||
compat.profdata.v1 | ||
compat.profdata.v2 | ||
compat.profdata.v4 | ||
compressed.profraw | ||
counter-mismatch-1.proftext | ||
counter-mismatch-2.proftext | ||
counter-mismatch-3.proftext | ||
counter-mismatch-4.proftext | ||
cs.proftext | ||
cutoff.proftext | ||
empty.proftext | ||
extra-word.proftext | ||
foo3-1.proftext | ||
foo3-2.proftext | ||
foo3bar3-1.proftext | ||
gcc-sample-profile.gcov | ||
header-directives-1.proftext | ||
header-directives-2.proftext | ||
header-directives-3.proftext | ||
inline-samples.afdo | ||
instr-remap.expected | ||
instr-remap.proftext | ||
instr-remap.remap | ||
invalid-count-later.proftext | ||
mix_instr.proftext | ||
mix_sample.proftext | ||
multiple-profdata-merge.proftext | ||
no-counts.proftext | ||
noncs.proftext | ||
overflow-instr.proftext | ||
overflow-sample.proftext | ||
overlap_1.proftext | ||
overlap_1_cs.proftext | ||
overlap_1_vp.proftext | ||
overlap_2.proftext | ||
overlap_2_cs.proftext | ||
overlap_2_vp.proftext | ||
profile-symbol-list-1.text | ||
profile-symbol-list-2.text | ||
profile-symbol-list.expected | ||
same-name-1.proftext | ||
same-name-2.proftext | ||
same-name-3.proftext | ||
same-name-4.proftext | ||
sample-hot-func-list.proftext | ||
sample-overlap-0.proftext | ||
sample-overlap-1.proftext | ||
sample-overlap-2.proftext | ||
sample-overlap-3.proftext | ||
sample-overlap-4.proftext | ||
sample-overlap-5.proftext | ||
sample-profile.proftext | ||
sample-remap.expected | ||
sample-remap.proftext | ||
sample-remap.remap | ||
text-format-errors.text.bin | ||
vp-malform.proftext | ||
vp-malform2.proftext | ||
vp-truncate.proftext | ||
weight-instr-bar.profdata | ||
weight-instr-foo.profdata | ||
weight-sample-bar.proftext | ||
weight-sample-foo.proftext |