AutoFDO uses a function’s symbol name to look up profile data but
functions with internal linkages do not have globally unique
identifiers. This can lead to name conflicts leading to missing profiles
and performance. We are enabling compiler option
-funique-internal-linkage-names for AFDO builds that will uniquefy
internal linkage symbols making this problem go away.
This CL might regress the performance due to mismatched profiles. It
will recover once we update the profiles.
Test: presubmit
Bug: 218448389
Change-Id: I92a2b6f72b52faab79aec9148f1962111bad7232
The static() property is true for both static libraries and static
binaries. We should allow static binaries to enable AFDO.
Test: Enable AFDO for linker
Change-Id: I409fc9f764ea878f01dc42bb2e5c075219403009
A new configuration rule for sampling PGO. This differs from the
original pgo.go rule in the following ways:
* Automatic propagation to static dependencies
* Simpler configuration (just put `afdo: true` to optimsation targets)
http://go/android-afdo
Test: build
Bug: 79161490
Change-Id: Ie194824cd523bca19e10ced41d2078fc598f13b3