<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/62030>62030</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Make more formal description for PGO sample formats
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          zamazan4ik
      </td>
    </tr>
</table>

<pre>
    Clang documentation [describes](https://clang.llvm.org/docs/UsersManual.html#sample-profile-formats) multiple support sample file formats. During the evaluation of the integration of my own external profiler with a Clang PGO infrastructure, I found several caveats:

1. There is no described backward/forward compatibility support for any of these formats. Since GCOV format is owned by GCC project - you probably could do nothing but specify "that GCOV file formats are supported: which versions (if it supports versioning), which GCC versions, etc.). But for text and LLVM binary formats, you could specify this information.
2. Write "formal" specifications of text and LLVM binary profile formats as external documentation. So it would be easier for external people to write parsers/serializers for that formats. And there you could specify versioning policy, backward/forward compatibility guarantees, etc.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEVE2P4zYM_TXKhYjhyMkkPvgwk0EGBXawBbbdnmmZjtmRJUMfyXp-fSHbSXaBBXrJh0SK7z0-Er3nsyGqxO5F7F5XGENnXfWJPX6i2fLHqrbNWB01mjM0VsWeTMDA1oDYvTTkleOavNi9CnnoQhi8KJ6FPAl5Uikn0_rSZ9adhTw1VnkhT397cv4dTUSddaHXQhYe-0HTenC2ZU3r1roegxeyhD7qwIMm8HEYrAswh0KKgyUug9fo2JwhdAR0QR1ngLadTtgEOrv7UT-CvRqgH4GcQQ1LUQdXDh0gzFT_fPsKbFqHPrioQnQk5BH-gNZG04CnCznUoPBCCWjxLPJXkS-fmwz-6sgRsAdj4SZSAzWqjyu6RshTa136Bcr2AwauWXMY7yRb6wDNuDDwPzH9xkYRvB2_fl_OUhF7Nen1Ed6Ox8TnX1IB1jDamP7VWOsRlI26gcaCsaFLYtUxgB9IcTuCkDJ0GJZ3f5IW0N2lp0YUz3DtWHVwIefZGg9CHrgFDrcgf7ticxayTKLNGQnaLSudUlCZkGUGL3HmG-hHADQNfPny_R1qNuhGuDvhOLGZSdxQh459atIUw9Zks_wyg38cB0qspjstpFySWE2RflL2dwUXNzz4-4dTfrF_Bt9s4n2dINUEhJ7JTVQe3iKbzBosXCdEA7pkfiFPnhyj5k9yfmaf5L93-dk0qfGOfsP6oS8MVrMakzj_66xzRIcmEN3FXzVV0ZRFiSuqNk-HTb6Th-Kw6ip5OGxqtd3v94qaHcq8VXJblptc4XZbNHLFlcxlkW_zcrPL95tD9tQWu1Id9tv9ri1xX4ttTj2yvg__ir2PVD3JvMhXGmvSflo4Uhq6wnQppEz7x1UpZ13HsxfbXLMP_vFK4KCpescPgt66pUl6GbBhGvCkZZrd25qYFV1Fp6tft9OZQxfrTNleyFOqsHytl_kR8jThSs2acP8XAAD__8E0zMQ">