Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for May 23, 2013
An "enum" for Python 3
An unexpected perf feature
LWN.net Weekly Edition for May 16, 2013
A look at the PyPy 2.0 release
Link-time optimization for the kernel
Posted Aug 21, 2012 16:59 UTC (Tue) by Homer512 (subscriber, #85295)
(Gentoo user myself, so this is not meant mockingly)
Posted Aug 23, 2012 0:53 UTC (Thu) by prometheanfire (subscriber, #65683)
Posted Aug 21, 2012 17:08 UTC (Tue) by mikemol (subscriber, #83507)
In reality, though, building a kernel with LTO isn't going to take as long as, say, building LibreOffice, Firefox or Chromium. Those take sufficiently long that more than a few Gentoo users prefer to use binary ebuilds rather than build them themselves.
What's really needed here, though, are automated regression tests to improve the confidence that the output of an LTO build isn't the most likely source of problems. That's the kind of thing that would need massive corporate sponsorship to get off the ground, though; there's a *ton* of code in the kernel, and while it's reasonably well-organized, that's still a lot of tests to write.
It's also necessary to understand that you can't be 100% confident you've caught all possible compiler-introduced bugs. The best you might be able to do is identify the portions of the kernel which the LTO pass twiddled the most, and write additional tests to exercise that code from multiple angles.
I wonder if such an "LTO hotspot" analysis could be used to do certain high-level reasoning about the code. Being able to answer questions like "given that LTO-active regions have some relation to a property of the APIs in that area, is that property something we want to see more or less of in our APIs?" would be interesting; it could help inform tradeoffs in future designs of APIs.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds