On Fri, Jul 06, 2018 at 08:35:56PM +0300, Alexander Zaitsev wrote:
> Some packages in Fedora _are_ compiled with PGO. Off the top of
my
> head, both Firefox and Python 3 are, but only for the x86
> architectures. It takes too long for other architectures.
GCC is built with PGO as well (on all architectures).
> I don't know if there's significant demonstrative
benefit across the
> board for PGO, given the additional time it adds to package builds...
It can often give a 10-30% boost.
Hmm.. Sounds interesting. If some packages are built with PGO, so
which
profiling information is used for compilation with PGO? Maintainers manually
collect it or take this information from some source?
The normal way of building with PGO is build once with -fprofile-generate,
run the program during package build with a typical workload (worst case
e.g. a testsuite, but a good testsuite should test also corner cases that
are unlikely in real-world usage) and then compile it again with
-fprofile-use where it picks the collected data.
Another option (though, no experience with that) is AutoFDO, where it is
built normally, run under perf, the so gathered data transformed with
create_gcov and finally built with -fauto-profile.
Jakub