[Bug 262495] lang/python*: add option PGO and enable by default, add LTO option to python27 and enable by default

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 12 Mar 2022 03:16:32 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262495

Kubilay Kocak <koobs@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |koobs@FreeBSD.org

--- Comment #1 from Kubilay Kocak <koobs@FreeBSD.org> ---
Created attachment 232397
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=232397&action=edit
clang as cc detection for pgo

Thanks Piotr

What is the nature of the dependence on PGO for LTO? 

If this is only a consequence of the 'optimization' option 'needing' both [1],
we shouldn't couple ourselves to that option.

Also I don't believe we should default to PGO builds, particularly at such an
early stage, as the profiling and optimizations instrumentation on the official
package build hardware, will only be specific to that hardware, and may not be
appropriate for, is unlikely to be, or may result in performance regressions
on, any other (user) hardware.

There was also an issue identified during my testing  with Python not detecting
cc (clang) for PGO [2], which requires and additional '*)' case for defaulting
to 'clang style PGO'. There may be alternate ways to address this, and this was
not tested in the gcc case. We wont want to carry local patches in the long
term either, so working with upstream to resolve this is important.

We'll also want to test and confirm QA across all supported freebsd versions,
archs, and toolchains (gcc included) explicitly, and include Python's test
suite in that QA. At a minimum the test failure delta should not change.

Unfortunately, a successful build alone is insufficient for LTO/PGO, and there
are many results for LTO/PGO Python segfaults and other issues at runtime out
there.

[1] https://bugs.python.org/issue29766
[2] https://464982.bugs.gentoo.org/attachment.cgi?id=344902

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.