GCC Newspaper
OCTOBER 6, 2026
rfc — Proposed

Standalone AutoFDO Profile Tool for GCC

Proposal for a standalone AutoFDO profile tool, seeking feedback on perf data parsing and potential library reuse.

Kugan Vivekanandarajah proposes a standalone tool for AutoFDO profiles, distinct from the integrated GCC approach. He is seeking input on how to best handle the parsing of perf.data files and is open to suggestions for using existing libraries or a simpler parsing method. This initiative aims to offer more flexibility in profile data generation for compiler optimizations.

In the Thread 2 participants
  1. Kugan Vivekanandarajah <kvivekananda@nvidia.com> proposer

    Seeking input on perf data parsing for a new standalone AutoFDO tool, open to using existing libraries or simpler methods.

    “We limited the perf parsing to only what we wanted. If there is an easier way to seperate this out and use an exiting library, that would be great. I am open for suggestions.”
  2. Andi Kleen <andi@firstfloor.org> reviewer

    Responds to concerns about perf.data format stability, suggesting that while the format is stable, issues might arise from extensions or the perf library's handling of unknown ones.

    “That perf.data format is stable, but it supports extensions, and the perf library that autofdo uses didn't use to ignore unknown ones. I thought that had been fixed however. I don't think the format is a problem for a well written reader.”

Technical Tradeoffs

  • Leveraging existing libraries (e.g., libperf) might simplify development but could introduce dependencies or interface instability.
  • Developing custom parsing offers more control but increases development effort and maintenance burden.
  • Standalone tool vs. integrated approach: Flexibility vs. potential for code duplication or integration challenges.

In Details

This RFC proposes a new, standalone tool for generating AutoFDO profiles, separating it from the existing integrated GCC infrastructure. The core challenge discussed is efficient and robust parsing of perf.data files, with a focus on whether to leverage existing libraries like libperf or implement custom parsing logic. The goal is to provide a more flexible profile generation mechanism for compiler-driven optimization.

Filed Under: optimizationprofilingAutoFDOperfcompiler