llvm-project/llvm/test/Transforms/SampleProfile/Inputs
wlei d6a0585dd1 [SampleFDO] Compute and report profile staleness metrics
When a profile is stale and profile mismatch could happen, the mismatched samples are discarded, so we'd like to compute the mismatch metrics to quantify how stale the profile is, which will suggest user to refresh the profile if the number is high.

Two sets of metrics are introduced here:

 - (Num_of_mismatched_funchash/Total_profiled_funchash), (Samples_of_mismached_func_hash / Samples_of_profiled_function) : Here it leverages the FunctionSamples's checksums attribute which is a feature of pseudo probe. When the source code CFG changes, the function checksums will be different, later sample loader will discard the whole functions' samples, this metrics can show the percentage of samples are discarded due to this.
 -  (Num_of_mismatched_callsite/Total_profiled_callsite), (Samples_of_mismached_callsite / Samples_of_profiled_callsite) : This shows how many mismatching for the callsite location as callsite location mismatch will affect the inlining which is highly correlated with the performance. It goes through all the callsite location in the IR and profile, use the call target name to match, report the num of samples in the profile that doesn't match a IR callsite.

This is implemented in a new class(SampleProfileMatcher) and under a switch("--report-profile-staleness"), we plan to extend it with a fuzzy profile matching feature in the future.

Reviewed By: hoy, wenlei, davidxl

Differential Revision: https://reviews.llvm.org/D136627
2022-10-26 21:06:52 -07:00
..
bad.extbinary.afdo
bad_discriminator_value.prof
bad_fn_header.prof
bad_line_values.prof
bad_mangle.prof
bad_sample_line.prof
bad_samples.prof
branch.prof
calls.prof
cold-indirect-call.prof
cov-zero-samples.prof
coverage-warning.prof
csspgo-import-list-no-funca.prof [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
csspgo-import-list-replay.txt [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
csspgo-import-list.prof [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
csspgo-use-preinliner.prof [CSSPGO] Add switch for sample loader to honor global pre-inliner decision from llvm-profgen 2021-08-25 17:20:15 -07:00
ctxsplit.extbinary.afdo
discriminator.prof
einline.prof
entry_counts.prof
entry_counts_cold.prof
flattened.prof
fnptr.binprof
fnptr.prof
fsafdo.extbinary.afdo [SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part) 2021-06-02 10:32:52 -07:00
fsafdo.prof [SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part) 2021-06-02 10:32:52 -07:00
function_metadata.compact.afdo
function_metadata.prof
function_metadata_replay.txt [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
gcc-simple.afdo
indirect-call-csspgo.prof
indirect-call.afdo
indirect-call.compact.afdo
indirect-call.prof
inline-act.prof
inline-callee-update.prof
inline-cold.prof
inline-combine.prof
inline-coverage.prof
inline-hint.prof
inline-mergeprof.md5.prof
inline-mergeprof.prof
inline-priority.prof [CSSPGO] Use nested context-sensitive profile. 2021-12-14 14:40:25 -08:00
inline-replay-function.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay-line.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay-linecolumn.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay-linediscriminator.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-replay.txt [InlineAdvisor] Add fallback/format switches and negative remark processing to Replay Inliner 2021-10-29 12:32:03 -07:00
inline-topdown-inline-all.prof [InlineAdvisor] Add -inline-replay-scope=<Function|Module> to control replay scope 2021-10-18 13:08:39 -07:00
inline-topdown-missing.prof [SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect 2021-10-29 12:04:52 -07:00
inline-topdown.prof
inline.compactbinary.afdo
inline.extbinary.afdo
inline.fixlenmd5.extbinary.afdo
inline.md5extbinary.afdo
inline.prof
merge-function-attributes.afdo [AFDO] Merge function attributes after inlining 2021-07-09 16:47:12 -07:00
misexpect.prof [llvm][misexpect] Re-enable MisExpect for SampleProfiling 2022-08-26 20:24:10 +00:00
nodebug.prof
nolocinfo.prof
norepeated-icp-2.prof
norepeated-icp-3.prof
norepeated-icp.prof
offset.prof
profile-context-order-scc.prof [CSSPGO][PriorityInliner] Do not use block weight to drive callsite inlining. 2022-03-01 18:43:19 -08:00
profile-context-order.prof [CSSPGO][PriorityInliner] Do not use block weight to drive callsite inlining. 2022-03-01 18:43:19 -08:00
profile-context-tracker.prof
profile-correlation-irreducible-loops.prof A post-processing for BFI inference 2021-06-11 21:46:04 -07:00
profile-inference-even-count-distribution.prof [CSSPGO] Even flow distribution 2022-03-02 13:12:05 -08:00
profile-inference-islands.prof profi - a flow-based profile inference algorithm: Part II (out of 3) 2021-12-02 11:04:21 -08:00
profile-inference-noprobes.prof profi - a flow-based profile inference algorithm: Part III (out of 3) 2021-12-02 12:01:30 -08:00
profile-inference-rebalance-large.prof A better profi rebalancer 2022-01-18 12:14:24 -08:00
profile-inference-rebalance.prof profi - a flow-based profile inference algorithm: Part III (out of 3) 2021-12-02 12:01:30 -08:00
profile-inference.prof profi - a flow-based profile inference algorithm: Part I (out of 3) 2021-12-01 15:30:38 -08:00
profile-mismatch.prof [SampleFDO] Compute and report profile staleness metrics 2022-10-26 21:06:52 -07:00
profile-symbol-list.ll [test] Change test/SampleProfile to use opaque pointers 2022-07-17 17:38:35 -07:00
profile-symbol-list.text Handle whitespace in symbol list 2022-01-18 14:34:40 -06:00
profile-topdown-order.prof
profsampleacc.extbinary.afdo
propagate.prof
pseudo-probe-func-metadata.prof
pseudo-probe-icp-factor.prof
pseudo-probe-inline.prof [CSSPGO] Report zero-count probe in profile instead of dangling probes. 2021-06-16 11:45:29 -07:00
pseudo-probe-profile-metadata.prof
pseudo-probe-profile-mismatch.prof [SampleFDO] Compute and report profile staleness metrics 2022-10-26 21:06:52 -07:00
pseudo-probe-profile.prof
pseudo-probe-update.prof
remap-2.prof
remap.map
remap.prof
remarks-hotness.prof
remarks.prof
summary.prof
syntax.prof
uniqname.nosuffix.afdo
uniqname.suffix.afdo
uniqname.suffix.prof
use-sample-profile-attr.prof
warm-inline-instance.prof