forked from OSchip/llvm-project
c67ccf5faf
and indirect call promotion candidate. Profile remapping is a feature to match a function in the module with its profile in sample profile if the function name and the name in profile look different but are equivalent using given remapping rules. This is a useful feature to keep the performance stable by specifying some remapping rules when sampleFDO targets are going through some large scale function signature change. However, currently profile remapping support is only valid for outline function profile in SampleFDO. It cannot match a callee with an inline instance profile if they have different but equivalent names. We found that without the support for inline instance profile, remapping is less effective for some large scale change. To add that support, before any remapping lookup happens, all the names in the profile will be inserted into remapper and the Key to the name mapping will be recorded in a map called NameMap in the remapper. During name lookup, a Key will be returned for the given name and it will be used to extract an equivalent name in the profile from NameMap. So with the help of the NameMap, we can translate any given name to an equivalent name in the profile if it exists. Whenever we try to match a name in the module to a name in the profile, we will try the match with the original name first, and if it doesn't match, we will use the equivalent name got from remapper to try the match for another time. In this way, the patch can enhance the profile remapping support for searching inline instance and searching indirect call promotion candidate. In a planned large scale change of int64 type (long long) to int64_t (long), we found the performance of a google internal benchmark degraded by 2% if nothing was done. If existing profile remapping was enabled, the performance degradation dropped to 1.2%. If the profile remapping with the current patch was enabled, the performance degradation further dropped to 0.14% (Note the experiment was done before searching indirect call promotion candidate was added. We hope with the remapping support of searching indirect call promotion candidate, the degradation can drop to 0% in the end. It will be evaluated post commit). Differential Revision: https://reviews.llvm.org/D86332 |
||
---|---|---|
.. | ||
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 | ||
discriminator.prof | ||
einline.prof | ||
entry_counts.prof | ||
entry_counts_cold.prof | ||
flattened.prof | ||
fnptr.binprof | ||
fnptr.prof | ||
function_metadata.compact.afdo | ||
function_metadata.prof | ||
gcc-simple.afdo | ||
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-replay.txt | ||
inline-topdown.prof | ||
inline.compactbinary.afdo | ||
inline.extbinary.afdo | ||
inline.md5extbinary.afdo | ||
inline.prof | ||
nodebug.prof | ||
nolocinfo.prof | ||
offset.prof | ||
profile-symbol-list.ll | ||
profile-symbol-list.text | ||
profsampleacc.extbinary.afdo | ||
propagate.prof | ||
remap-2.prof | ||
remap.map | ||
remap.prof | ||
remarks.prof | ||
summary.prof | ||
syntax.prof | ||
use-sample-profile-attr.prof | ||
warm-inline-instance.prof |