I’m wondering if anyone can enlighten me on specifics for how Clear Linux applies AutoFDO (e.g. as mentioned in places like here as well as some news blogs (but since I’m a new poster I’m unable to post many links).
I haven’t been able to find anything so far with these kinds of details, but if anyone can point me to something online, that would be fantastic.
- When the distribution is built, when is the profile data collected? The big benefit of AutoFDO is that you don’t need a separate instrumentation build step, but I’m not sure I understand how you could collect profile data before the package is built, in the general case. The about page for Clear Linux suggests that compilation is done twice, so could similar optimization be done using non-Auto FDO (i.e. -fprofile-generate, -fprofile-use)?
- Which packages get AutoFDO treatment? Is it done for all packages? If not, how are the packages chosen?
- Does Clear Linux use the same steps documented in the GCC AutoFDO Tutorial (https://gcc.gnu.org/wiki/AutoFDO/Tutorial)?
- Those tutorial steps say to pass the executable name to create_gcov, to produce the file needed for gcc’s -fauto-profile option. How does the build process know what executables need to have gcov files created, for each package being compiled? In particular, how does library code get AutoFDO’ed?
- How is the workload chosen when collecting profile data?
Thanks for any clarification! If any of this information is actually already public, I’d appreciate a pointer to it.