Re: RFC: Standalone AutoFDO Profile Tool for GCC
Sam James via Gcc <[email protected]>
| Newsgroups | gmane.comp.gcc.devel |
|---|---|
| Organization | Gentoo |
| Message-ID | <[email protected]> |
Jan Hubička via Gcc <[email protected]> writes: > On Thu, Apr 23, 2026 at 1:09 AM Kugan Vivekanandarajah < > [email protected]> wrote: > >> Hi, >> >> Building on our discussions from the last Cauldron, we propose creating a >> native, simplified AutoFDO tool for GCC to replace our current reliance on >> external Google tools which is not actively maintained. I'll follow up with >> a detailed design document as soon as we have a consensus on the proposal. >> > > Thank you for writting it. In my opinion the tool is really needed to make > AutoFDO practically useful, so I hope it will happen this stage 1 :) > >> >> Thanks, >> Kugan >> >> Summary >> ======= >> >> We propose a standalone, minimal tool for generating AutoFDO profiles >> that can be consumed by the GCC AutoFDO toolchain, with the goal of >> integrating it into the GCC repository. The tool would >> support: (1) offline read existing perf.data (single-process or >> system-wide) and produce a profile for a target binary; (2) direct >> attach to a process via the PMU (LBR or BRBE / SPE), bypassing perf >> record and building the profile from the live sample stream; (3) >> > I think this is quite important missing feature of the existing tool. With > branch history, It is hard to balance > the setting to keep profile good while avoiding too large perf.data file. > Data used by > GCC is much smaller. > >> - Current AutoFDO tools (e.g. from Google) are not widely used with >> GCC. LLVM has a similar profile-creation tool integrated with the >> compiler. A tightly coupled tool for GCC would allow for easy >> development and upgradation. >> > I also wonder if there is a chance for collaboration/integration with perf > tools itself. > In particular, the current tool is picky about perf.data file format that > is not completely > stable. So perhaps the perf.data loading can be sharing a library with > perftools. > On the other hand hwoever minimizing dependencies is quite important. I think Andi had https://github.com/andikleen/perf-gcov. > > Honza > >> >>
signature.asc
(application/pgp-signature, 418 B)
-----BEGIN PGP SIGNATURE----- iQEBBAEWCgCpFiEEJaa7iN2bdkxrVUHCc4QJ9SDfkZAFAmn5h0sbFIAAAAAABAAO bWFudTIsMi41KzEuMTIsMiwyXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25z Lm9wZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyNUE2QkI4OEREOUI3NjRDNkI1NTQx QzI3Mzg0MDlGNTIwREY5MTkwDxxzYW1AZ2VudG9vLm9yZwAKCRBzhAn1IN+RkDws AQCyx7uGrZBrlGW7ZxxTZBRMHK45dtn5A0+ZlXQfM8fi2gD+PpVSIMe0ueA8tYDF igJHcEl9cGIguAw1HhuxJazxmgY= =GAHe -----END PGP SIGNATURE-----