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

    <tr>
        <th>Summary</th>
        <td>
            __llvm_profile_write_file can only append data to profraw file
        </td>
    </tr>

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

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

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

<pre>
    Can "__llvm_profile_write_file" merge the current profile data into profraw file without just appending the profile data to the file? 
Appending will make the profraw file larger and larger while I call the "__llvm_profile_write_file" method.

Can "__llvm_profile_write_file" update the data of profraw file instead of appending data to the profraw file?

The profraw file will get larger and larger, but when I parse the profraw file into profdata file, the size is very small.

Hope "__llvm_profile_write_file" or some other methods can support "update mode" other than "append mode"
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyMU81upDwQfBpzaWVkbJhkDhzmm09oc9rL3kce3APOGhvZ7aDs068wZJLsj7InrHZ1dVU1VjGa3iE2rP6P1f8XKtHgQ_M1EYaT9UkXF69fmpNywIQ4n619Hs9T8Fdj8TwHQ3hejkwIGDH0CDQgdCkEdAQbDrQiBcaRz5WgZsjl2dDgE8FTigRqmtBp4_rM8KGTfK7lObIFxo_HG3g21sKovuOt7UZvVegxgHL69TgPS_0ROmVtxn9uiQavd4wfGT_-SwZp0opWLVm6v37UZFwkVHqpvxl-b_I9msl2nfztV2vZdY_0u0cmTnBJBPOADh5hUiH-IZrbLvLoVfwpw6L5gWAiPGN4gTgqazf3X_z0eV4-QPQjgqcBw5ZehE45iGmafKCFYcto9HrtyVga1nTXVF4vC91IfZAHVWBT3le1PBwqWRVDc-VX5Pv6ntf3dfVQaqmqfdlxua-xVHjpCtMILmpeCckPJZfVrqqulZBC7vHwgFrWrOI4KmN3i52dD31hYkzYlHL_IMvCqgvamF-FEA5nyLdMiOWRhGZpurukPrKKWxMpvtGQIYvNX2PKaXhnX7Yf4Lb99wsqUrDNQDRFJo9MtEy0vaEhXXadH5loF-7tczcF_4QdMdFmiZGJdvPw3IifAQAA__--qlTh">