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

    <tr>
        <th>Summary</th>
        <td>
            [clang][lld] Time-Trace File Naming Inconsistencies
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang,
            lld
      </td>
    </tr>

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

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

<pre>
    ## Description

The generated file names when using the `time-trace` functionality in `clang` and `lld` are inconsistent.

Clang uses a `.json` extension
https://github.com/llvm/llvm-project/blob/f4cf15d225fdaf98c106a4adfae57dae509607ff/clang/lib/Driver/Driver.cpp#L5440
while LLD uses the `.time-trace` it inherits from the `TimeTraceProfiler` 
https://github.com/llvm/llvm-project/blob/f4cf15d225fdaf98c106a4adfae57dae509607ff/llvm/lib/Support/TimeProfiler.cpp#L356

These file extensions should be unified for consistency and to make collection more uniform.

## Possible Solution

One proposal is to use `.time-trace.{clang|lld}.json`. This makes the origin & purpose of the file clear.  Most importantly, it will also prevent any potential collisions. Additionally, by keeping the `.json` filetype associations in the OS will be able to open the file in appropriately.

I'd be happy to submit a fix for this with the naming convention that is decided.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8VE1vpDgQ_TXuSykIzFdz4JCk1dJI2Z2Rkj9Q4KKpGWMj2yTD_vqVId2Z5LaXvXSDqFd-9d4ro_d8MUStKB9EeTrgEkbr2glXNPTPobNqbYXMhczhRL53PAe2RqQnkd7vvy8jwYUMOQykYGBNYHAiD28jGVg8mwuEkUBUaeCJ7oLDnkSVwrCYPjZDzWEFNrGi12gu8SMaFd-1VtubI2DTW-PZBzIh-ZPAY8TA4skDRkzy01sTUfQ7kPE3umMIsxf5vZBnIc8XDuPSJb2dhDxr_Xr9u5ud_Ul9EPLcadsJeR6KfshKJWU5KByaY5-lFRaoBqSyVkhl2lRpPQ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