Profile Guided Optimization (PGO)

David A. Wheeler dwheeler at dwheeler.com
Wed Jun 22 16:22:53 UTC 2022



> On Jun 21, 2022, at 2:56 PM, Orians, Jeremiah (DTMB) <OriansJ at michigan.gov> wrote:
> 
>>> It'll solve the reproducible problem but introduce a bootstrapping 
>>> problem for how those files were generated in the first place.
>> FWIW, this seems sorta fine to me.
>> As long as a build path exists which _doesn't_ require the PGO AOT snapshot info to build successfully.
> That is very true, however we have seen even GNU packages that couldn't be built from the distributed
> source code and everyone just used the "pregenerated" files to produce working binaries.
> 
> So I have very little trust that builds without such crap will continue to work correctly.
> 
>> But that seems unlikely to rot, doesn't it?
> Any functionality or path not routinely exercised on *EVERY* release has a tendency to decay until it no
> longer functions. Much like inactive genes accumulate mutations with each passing generation.
> 
> And if GNU packages can't even preserve the ability to be built from source code, what gives you faith that
> these optimizations wouldn't bring similar problems going forward?

That suggests a fundamental failure, namely, having a manual release process.
The solution is obvious, namely, use an automated release process.
The automated release process should re-run a build & run its automated tests
to ensure it works.

The tweak to this would then be straightforward: Delete the PGO data and
ensure that you can rebuild it & pass all tests. It's a few extra steps in the
automated release process.

--- David A. Wheeler



More information about the rb-general mailing list